Repository navigation
GHA: Add Python sdist job to Package workflow - #2618
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the GitHub Actions packaging pipeline to also build and publish a Python source distribution (sdist) from the repository’s root pyproject.toml, and updates the setuptools-scm configuration to use the newer version_file key.
Changes:
- Add a standalone
sdistworkflow job that buildspython -m build --sdistand uploads the resulting artifact. - Update release/publish steps so
publish-githubdepends on the newsdistjob and runstwine checkon wheels + sdist. - Adjust PyPI publish preparation to include the sdist alongside wheels in
dist/, and updatepyproject.tomlto useversion_fileinstead of deprecatedwrite_to.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
pyproject.toml |
Updates setuptools-scm config for version file generation and removes outdated comment text. |
.github/workflows/Package.yml |
Adds an sdist job and wires sdist artifacts into GitHub release validation and PyPI publishing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
zivy
approved these changes
Jul 1, 2026
dave3d
approved these changes
Jul 1, 2026
Add a standalone sdist job to Package.yml that builds a Python source distribution using python -m build --sdist from the root pyproject.toml (scikit-build-core backend): - Runs on all triggers (PR, tag, dispatch) on ubuntu-latest - Artifact uploaded as artifacts-sdist/simpleitk-*.tar.gz - publish-github depends on sdist; twine check validates both wheels and the sdist - publish-pypi moves *.tar.gz alongside *.whl into dist/ so the sdist is uploaded to PyPI with the wheels Update pyproject.toml: - Remove outdated comment referencing build directory install - Use setuptools_scm 'version_file' (replaces deprecated 'write_to')
blowekamp
force-pushed
the
add-python-sdist
branch
from
July 1, 2026 18:22
7f37866 to
85c9e91
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a standalone
sdistjob that builds a Python source distribution usingpython -m build --sdistfrom the rootpyproject.toml(scikit-build-core backend).Changes
.github/workflows/Package.ymlsdistjob: runs on all triggers (PR, tag,workflow_dispatch) onubuntu-latest; uploads artifact asartifacts-sdist/simpleitk-*.tar.gzpublish-githubnow depends onsdist;twine checkvalidates both wheels and the sdistpublish-pypimoves*.tar.gzalongside*.whlintodist/so the sdist is uploaded to PyPI with the wheelspyproject.tomlwrite_towithversion_file(setuptools-scm ≥8)