Skip to content

Add a manual Python development wheel workflow - #1132

Merged
ColinLeeo merged 1 commit into
apache:developfrom
ColinLeeo:colin/pydev-wheels-recovered
Nov 19, 2026
Merged

ColinLeeo merged 1 commit into
apache:developfrom
ColinLeeo:colin/pydev-wheels-recovered

Conversation

@ColinLeeo

Copy link
Copy Markdown
Contributor

Motivation

The Build native release artifacts workflow deliberately accepts only final MAJOR.MINOR.PATCH source versions, so a development version such as the current 2.5.1.dev in cpp/CMakeLists.txt cannot 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 required version input (for example 2.5.1.dev0 or 2.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 requested MAJOR.MINOR.PATCH.devN version, updates both Python version declarations (python/setup.py and python/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-version checks that both the wheel filename and the METADATA file 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.yml and 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 an rc/** 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 — PASS
  • black --check on the changed Python files — clean

Note: workflow_dispatch workflows only become dispatchable once the file is on the default branch, so the first real run of wheels.yml will follow the merge.

Copilot AI left a comment

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.

🔵 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.devN versions, 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

@ColinLeeo
ColinLeeo merged commit 72d2c1f into apache:develop Nov 19, 2026
5 checks passed
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