Skip to content

Conversation

@peterfpeterson
Copy link
Member

@peterfpeterson peterfpeterson commented Jun 4, 2025

This takes advantage of pixi for creating the source tarball then edits the contents of pyproject.toml while renaming the unpacking directory. The change should be less effort to maintain than a patchfile.

The new package is installed on ndav. To test

$ finddata pg3 12345
/SNS/PG3/IPTS-8111/0/12345/NeXus/PG3_12345_event.nxs

References

EWM11625

@KedoKudo KedoKudo requested review from KedoKudo and Copilot June 5, 2025 13:07
@KedoKudo KedoKudo self-assigned this Jun 5, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR reworks the RPM build process by leveraging pixi for building the source tarball and updating the pyproject.toml file, while also simplifying the overall maintenance of the build scripts. Key changes include:

  • Introducing pixi commands in rpmbuild.sh to replace traditional build commands.
  • Lowering the required Python version in pyproject.toml and adding a new build-sdist task.
  • Removing the pyproject.patch file and adjusting the finddata.spec file for version and packaging updates.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

File Description
rpmbuild.sh Added pixi installation check and build commands; modified tarball extraction path.
pyproject.toml Adjusted Python version requirement and added a new build-sdist task under pixi tasks.
pyproject.patch Removed outdated patch file related to pyproject.toml changes.
finddata.spec Updated package version and Python package version definition; removed patch usage.
Comments suppressed due to low confidence (3)

finddata.spec:5

  • Confirm that defining the python package version as '3' is compatible with all target environments and does not introduce ambiguity.
%define python3_pkgversion 3

rpmbuild.sh:35

  • Verify that the tarball is reliably being placed in the 'sdist' directory as expected by this extraction command.
tar xzf "sdist/${TARBALL_SRC}" --strip 1 -C "python-finddata-${VERSION}" || exit 127

pyproject.toml:9

  • Ensure that lowering the minimum required Python version from 3.11 to 3.9 is fully supported and verified across the project.
requires-python = ">=3.9"

This takes advantage of pixi for creating the source tarball then edits
the contents of pyproject.toml while renaming the unpacking directory.
The change should be less effort to maintain than a patchfile.

[tool.pixi.tasks]
# PyPI
build-sdist = { cmd = "hatch build sdist", description = "Build the source distribution (tar.gz)" }
Copy link
Member

Choose a reason for hiding this comment

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

should probably adding this to the template repo in case other projects need similar features.

@KedoKudo KedoKudo merged commit 62ba984 into main Jun 5, 2025
2 checks passed
@KedoKudo KedoKudo deleted the rpm_do_over branch June 5, 2025 19:48
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.

3 participants