Publish wheels from every CI matrix OS, and publish an sdist - #36
Open
tonyhtchan wants to merge 1 commit into
Open
Publish wheels from every CI matrix OS, and publish an sdist#36tonyhtchan wants to merge 1 commit into
tonyhtchan wants to merge 1 commit into
Conversation
The publish step was gated to matrix.os == 'ubuntu-latest', so the macOS/Windows wheels built by CI were never actually uploaded to PyPI -- only linux wheels reached PyPI for the 0.0.2 release. No sdist was ever built or published either. Restructures into three jobs: build_wheels (unchanged build logic, just per-OS artifact names so they don't collide), a new build_sdist job, and a new publish job that gathers every wheel artifact plus the sdist and uploads them all together. This also means pip can build from source on any platform lacking a prebuilt wheel, instead of falling back to the much older 0.0.1.post1 sdist that's still the last one published.
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.
Problem
The 0.0.2 release's publish workflow builds wheels for
ubuntu-latest,windows-latest,macos-13, andmacos-14via cibuildwheel, but the publish step is gated withif: matrix.os == 'ubuntu-latest'. As a result, only the Linux wheels ever get uploaded to PyPI (confirmed on PyPI: 0.0.2 only hasmanylinux...x86_64wheels, no macOS/Windows wheels, and no sdist).This means anyone installing on macOS, Windows, or any Python/platform combination not covered by the published wheels falls back to pip trying to build from source -- but since there's no sdist for 0.0.2, pip falls back all the way to the last published sdist,
0.0.1.post1, which predates the currentpyproject.toml/simplifiedsetup.pyand fails to build on modern Python (e.g. its shipped pre-generatedirrep_bases.creferenceslongintrepr.h, removed in Python 3.11).I confirmed
masteras-is (this repo's current state) already builds and installs cleanly via a plainpip install .on Python 3.11/macOS arm64 -- no source changes needed, just the CI publishing gap.Fix
Restructures
.github/workflows/publish.yamlinto three jobs:build_wheels-- same build logic as before, just per-OS artifact names (wheels-${{ matrix.os }}) so multiple OS's wheel artifacts don't collide.build_sdist(new) -- builds an sdist viapipx run build --sdist.publish(new) -- downloads every wheel artifact plus the sdist, and publishes all of them together. Moved theenvironment: release/id-token: writepermissions here, since this is the job that actually needs them.Testing
Verified locally that a clean
pip installof this repo'smaster(no flags, no pins) builds and works correctly on Python 3.11 (macOS arm64):Didn't have Windows/Linux available to test those specifically, but the wheel-building steps for those OSes are unchanged from the existing (working) workflow -- only the publish step and artifact naming changed.