ci: build sdist with python -m build for a PEP 625-compliant filename#712
Merged
Conversation
PyPI rejected the v0.12.0 sdist upload:
400 Filename 'faust-streaming-0.12.0.tar.gz' is invalid,
should be 'faust_streaming-0.12.0.tar.gz'.
The release job built the sdist with the deprecated `setup.py sdist` under an
old setuptools floor, which emits the legacy hyphenated distribution filename.
PyPI now enforces PEP 625 and requires the normalized name (underscores).
Build the sdist with `python -m build --sdist` instead, and raise the
build-system setuptools floor to >=69 (which normalizes sdist filenames), so
the artifact is named `faust_streaming-<version>.tar.gz`. The wheels were
already fine (cibuildwheel emits the normalized name).
Verified locally: `python -m build --sdist` now produces
`faust_streaming-<version>.tar.gz`.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HHPL4VFWQRQPpjR1gXSKyL
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #712 +/- ##
=======================================
Coverage 94.15% 94.15%
=======================================
Files 104 104
Lines 11136 11136
Branches 1201 1201
=======================================
Hits 10485 10485
Misses 550 550
Partials 101 101 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Description
The v0.12.0 publish job failed uploading the sdist to PyPI
(run):
All wheels uploaded fine (
faust_streaming-0.12.0-*.whl, 200 OK) — only thesdist was rejected.
Root cause
The
build_sdistjob built the tarball with the deprecatedpython3 setup.py sdistunder an oldsetuptools>=30.3.0floor, which emitsthe legacy hyphenated distribution filename
faust-streaming-0.12.0.tar.gz.PyPI now enforces PEP 625 and requires the
normalized name (underscores):
faust_streaming-0.12.0.tar.gz.Fix
python -m build --sdistinstead ofsetup.py sdist.[build-system]setuptools floor to>=69, the version thatnormalizes sdist filenames per PEP 625.
The wheels were unaffected (cibuildwheel already emits the normalized name), so
no wheel-side change is needed. The publish step already sets
skip-existing: true, so a re-run will skip the already-uploaded 0.12.0 wheelsand upload only the (now correctly-named) sdist.
Verification
Local
python -m build --sdistnow produces:Note on recovering the v0.12.0 sdist
v0.12.0's wheels are already on PyPI; only its sdist is missing. Because a
workflow re-run uses the workflow file at the tagged commit (still the old
one), the cleanest way to get a correct sdist published is to cut v0.12.1
with this fix (wheels + sdist rebuild fresh;
skip-existinghandles anyoverlap). Alternatively, build the sdist locally with
python -m build --sdistand
twine uploadit to the existing 0.12.0 release.🤖 Generated with Claude Code
Generated by Claude Code