Repository navigation
Add a manual Python development wheel workflow - #1132
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The dispatch-only workflow still needs end-to-end validation on GitHub-hosted runners, particularly for the standalone Windows SDK build and 30 installed-wheel smoke tests.
No open issues 🎉
What changed in this PR
Adds a separate, manual-only workflow for building Python development wheels without changing native release packaging or the native library’s source/ABI version.
Changes:
- Builds and smoke-tests development wheels across five platforms and CPython 3.9–3.14, with wheel-only artifacts retained for 14 days.
- Validates explicit
MAJOR.MINOR.PATCH.devNversions, updates both Python version declarations, and checks wheel filenames and metadata. - Adds regression tests, workflow contract checks, and documentation while preserving the native workflow’s final-release-only policy.
| File | Description |
|---|---|
packaging/tests/test_python_wheel_contents.py |
Tests matching and mismatched development wheel versions. |
packaging/tests/test_python_dev_version.py |
Tests version preparation, validation, and step outputs. |
packaging/tests/check_native_workflow.rb |
Checks manual-only, read-only, wheel-only workflow constraints. |
packaging/scripts/prepare_python_dev_version.py |
Validates and updates Python development versions. |
packaging/scripts/check_python_wheel.py |
Adds optional exact-version checks for wheel filenames and metadata. |
packaging/README.md |
Documents development wheel builds and release workflow boundaries. |
.github/workflows/wheels.yml |
Adds the manual development wheel build and upload workflow. |
Review effort: Balanced
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.
Motivation
The
Build native release artifactsworkflow deliberately accepts only finalMAJOR.MINOR.PATCHsource versions, so a development version such as the current2.5.1.devincpp/CMakeLists.txtcannot produce any artifacts. Today there is no way to build installable wheels for a development version to test the Python binding ahead of a release.This adds a separate, manual-only workflow that builds Python development wheels without touching native release packaging.
Changes
.github/workflows/wheels.yml: manual-only workflow with a requiredversioninput (for example2.5.1.dev0or2.5.1.dev2). It builds on the same five platforms and six CPython versions as the release workflow, smoke-tests the installed wheels, and uploads wheel-only artifacts retained for 14 days.packaging/scripts/prepare_python_dev_version.py: validates the requestedMAJOR.MINOR.PATCH.devNversion, updates both Python version declarations (python/setup.pyandpython/pyproject.toml) in the checkout, and emits the version as a step output. Only Python package metadata changes; the native library keeps its source/ABI version.packaging/scripts/check_python_wheel.py: new optional--expected-versionchecks that both the wheel filename and theMETADATAfile carry the exact requested version.packaging/tests/: unit tests for version preparation and the wheel version checks; the workflow contract check now validates the development workflow (manual-only, read-only permissions, wheel-only uploads) instead of asserting that the file does not exist.packaging/README.md: documents the development workflow and states that the native release workflow still accepts only final source versions.Relation to #1016
#1016 retired the former auto-triggered
wheels.ymland made the native workflow the single packaging entry point. This does not reinstate that behavior: the new workflow is manual-only, has read-only permissions, and builds only Python wheels, not native release packages or DEB/RPM/Homebrew artifacts. Pushing anrc/**branch still does not trigger it.Testing
python3 -m unittest discover -s packaging/tests -p 'test_*.py'— OK (including the new development-version tests)ruby packaging/tests/check_native_workflow.rb— PASSblack --checkon the changed Python files — cleanNote:
workflow_dispatchworkflows only become dispatchable once the file is on the default branch, so the first real run ofwheels.ymlwill follow the merge.