Repository navigation
Release tooling: twine 7 and build from the pixi-locked env - #10
Merged
Merged
Conversation
…load Recent hatchling emits Metadata-Version 2.5; twine 6.2 hard-codes an accepted list ending at 2.4 and rejects the wheel. Pull twine 7 from PyPI (the conda-forge build crashed on import in this env). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
python -m build was pulling whichever hatchling PyPI had that day into an isolated env, so the build backend (and the metadata it emits) was unpinned. Add hatchling to the release feature and build with --no-isolation so pixi.lock governs the backend version. Give build-system.requires a lower bound for anyone building from the sdist. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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
Releasing 0.8.1 failed with:
Two causes:
python -m buildruns in an isolated env and pulled the newest hatchling (1.32.4) from PyPI, which now emitsMetadata-Version: 2.5. The build backend version was effectively unpinned.twine/package.py), overridingpackaging's own support for 2.5, so it rejected a valid wheel.Changes
[dependency-groups] release). The conda-forge twine 7.0.0 build crashed on import in this env, so the PyPI build is used.pixi.lock, andpypi-buildnow runsrm -rf dist && python -m build --no-isolation. The backend comes from the locked env, so future hatchling upgrades are a deliberatepixi updatewith a lockfile diff instead of a surprise on release day. Therm -rf distkeeps stale artifacts from an earlier version out oftwine upload dist/*.build-system.requiresgets a lower bound (hatchling>=1.27) for anyone building from the sdist.Verification
pixi run -e release pypi-buildrebuilds from the locked env. The wheel'sGeneratorreads hatchling 1.32.4, matchingpixi.lock.twine check dist/*passes on both artifacts.pyproject.tomlandpixi.lock, which reflect this PR;PKG-INFOandcluster_api/are identical.🤖 Generated with Claude Code
@StephanPreibisch