fix: tombstone build needs setuptools installed explicitly - #242
Merged
Conversation
The TestPyPI rehearsal (run 32309423898) failed before uploading anything: the sdist builds with --no-isolation, and Python 3.12 dropped setuptools from the default environment, so the runner had no build backend. It surfaced as `BackendUnavailable: Cannot import 'setuptools.build_meta'` from inside pyproject_hooks — naming neither the cause nor the fix. It did not reproduce locally because this machine's 3.12 happens to carry setuptools. A bare 3.12 venv does not, which is the runner's condition. - publish_tombstone.yml installs setuptools explicitly. - build_sdist() checks for the backend first and says what to install, so the next environment without it gets an answer instead of a stack trace. - A test pins the precondition. Verified in a bare 3.12 venv (the runner's condition): the check fires with the clear message, and with setuptools installed all five sdists build and `twine check` passes on every one. Issue: #238 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 19, 2026
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.
Follow-up to #240, part of #238.
The TestPyPI rehearsal (run 32309423898) failed — which is what a rehearsal is for. It failed at build, before the upload step, so nothing was published and no version was burned (
test.pypi.orghas noautolens 2026.7.29.1.post1).Cause
The sdist builds with
--no-isolation— deliberate, so the build cannot silently reach the network for a backend. Python 3.12 dropped setuptools from the default environment, and the workflow installed onlybuildandtwine. The result:That message names neither the cause nor the fix. It did not reproduce locally because this machine's 3.12 happens to carry setuptools — a bare 3.12 venv does not, which is exactly the runner's condition.
Fix
publish_tombstone.ymlinstallssetuptoolsexplicitly.build_sdist()checks for the backend first and raises a message saying what to install, so the next environment without it gets an answer rather than a stack trace.test_missing_setuptools_is_reported_before_the_buildpins the precondition.Verification
Reproduced the runner's condition in a bare 3.12 venv (
find_spec("setuptools") is None):Requires-Python <3.12, andtwine checkPASSED on every one.That last step matters beyond this bug: it is the first confirmation that the tombstone metadata is acceptable to a package index at all.
Full suite: 330 passed.
API Changes
None. Build tooling only; no PyAuto* library API is touched.
🤖 Generated with Claude Code