-
Notifications
You must be signed in to change notification settings - Fork 34
Restore RPM builds from pyproject configuration #165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Plamen Dimitrov <plamen.dimitrov@intra2net.com>
RPM builds with the previous configuration bring to
ValueError: invalid pyproject.toml config: `project.license`.
configuration error: `project.license` must be valid exactly by one definition (2 matches found):
- keys:
'file': {type: string}
required: ['file']
- keys:
'text': {type: string}
required: ['text']
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.
Signed-off-by: Plamen Dimitrov <plamen.dimitrov@intra2net.com>
The RPM spec file already contains a fixed or non-dynamic version so having a dynamic version for the pyproject.toml doesn't bring any benefit. Exporting env variables to force such a version is complicated when mixed with the isolated bash environments for the separate stages and sed-ing the pyproject file is invasive and might not work with all autosetup magic. Signed-off-by: Plamen Dimitrov <plamen.dimitrov@intra2net.com>
WalkthroughThe changes update project build and metadata configuration. In Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pyproject.toml (1)
2-2: Remove setuptools-scm dependency and configuration when using static versioning.With an explicit static version on line 9,
setuptools-scmis no longer needed. Its presence adds unnecessary build complexity and dependency overhead. The[tool.setuptools_scm]configuration (lines 44-46) is now ineffective.🔎 Proposed fix to remove setuptools-scm
[build-system] -requires = ["setuptools>=61.0", "setuptools-scm>=8"] +requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta"Also remove the unused configuration section:
-[tool.setuptools_scm] -version_scheme = "post-release" -local_scheme = "node-and-date" -And from line 36, remove it from dev dependencies:
-dev = ["aexpect[test,lint]", "setuptools-scm>=8", "build", "twine"] +dev = ["aexpect[test,lint]", "build", "twine"]Also applies to: 9-9, 44-46
🧹 Nitpick comments (1)
python-aexpect.spec (1)
39-40: Consider using %pyproject_buildrequires for automatic dependency management.While the current explicit
BuildRequireswork correctly, the%pyproject_buildrequiresmacro can automatically generate build dependencies frompyproject.toml, reducing maintenance burden.🔎 Optional refactor to use %pyproject_buildrequires
BuildArch: noarch -BuildRequires: python3-devel -BuildRequires: python3-setuptools +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +%generate_buildrequires +%pyproject_buildrequiresThis automatically pulls
python3-setuptoolsand other build dependencies from yourpyproject.toml.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
pyproject.tomlpython-aexpect.spec
🔇 Additional comments (3)
python-aexpect.spec (2)
63-63: LGTM! Modern pyproject macros are correctly implemented.The migration from legacy
%py3_build/%py3_installto modern%pyproject_wheel/%pyproject_install/%pyproject_save_filesmacros is correct and follows current Fedora/RHEL Python packaging guidelines. This approach provides better integration with PEP 517 build systems and automatic file list generation.Also applies to: 66-67
76-76: LGTM! File listing automation improves maintainability.Using
-f %{pyproject_files}automates Python file listing, reducing manual maintenance. Explicit entries for%license,%doc, and binaries remain appropriate.pyproject.toml (1)
10-10: No changes needed. The pyproject.toml uses the SPDX identifierGPL-2.0-or-laterand the .spec file uses the Fedora/RPM identifierGPLv2+— both correctly represent the same license using their respective ecosystem standards. Using different formats across different packaging systems is standard practice and expected.Likely an incorrect or invalid review comment.
|
I will wait for comments on the approach towards fixed version and why the arguments for it could be wrong before removing the |
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.