Skip to content

Improve building of RPMs - #63

Closed
peterfpeterson wants to merge 9 commits into
mainfrom
rpmbuild_ci
Closed

Improve building of RPMs#63
peterfpeterson wants to merge 9 commits into
mainfrom
rpmbuild_ci

Conversation

@peterfpeterson

@peterfpeterson peterfpeterson commented Sep 25, 2025

Copy link
Copy Markdown
Member

While trying to add a job to build the rpm in CI, it was discovered that rpmbuild.sh was partially repeating the work from the sync-version task in pixi. This refactors the code for clearing out things from the pyproject.toml and adds the version for the rpm to be an environment variable that is injected in.

There are also some small changes to pull in newer versions of pixi tasks from the python-project-template.

Check list for the pull request

  • I have read the [CONTRIBUTING]
  • I have read the [CODE_OF_CONDUCT]
  • I have added tests for my changes
  • I have updated the documentation accordingly

Check list for the reviewer

  • I have read the [CONTRIBUTING]
  • I have verified the proposed changes
  • best software practices
    • all internal functions have an underbar, as is python standard
    • clearly named variables (better to be verbose in variable names)
    • code comments explaining the intent of code blocks
  • All the tests are passing
  • The documentation is up to date
  • code comments added when explaining intent

Manual test for the reviewer

Check out the code on some place that can build rpms and run ./rpmbuild.sh then follow the instructions from the script to validate the rpm makes sense.

References

EWM13162

@peterfpeterson
peterfpeterson marked this pull request as ready for review September 25, 2025 14:39
Comment thread sync-version.sh
toml set tool.pixi.package.version "${VERSION}" --toml-path pyproject.toml
# remove all the things that reference dynamic versions
toml unset project.dynamic --toml-path pyproject.toml
toml set project.version "${VERSION}" --toml-path pyproject.toml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this line redundant? Isn't this being set twice? Once here and once in line 8 above? So can this be removed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are two different parts of the pyproject.toml. For whatever reason, the package.version and project.version are completely independent.

@peterfpeterson

Copy link
Copy Markdown
Member Author

This is being redone in #67

@peterfpeterson
peterfpeterson deleted the rpmbuild_ci branch September 29, 2025 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants