fix(setup): seed setuptools+wheel before editable install#16
Merged
Conversation
Python 3.12's venv module stopped seeding setuptools and wheel by default. The bare `pip install -e ".[dev]"` step in setup.sh fails because pip needs setuptools to build the editable install from pyproject.toml. The fallback to `pip install -e "."` fails for the same reason — both errors swallowed by `2>/dev/null`, leaving the venv with only pip installed and looking superficially "ready." Fix: explicitly seed pip+setuptools+wheel between venv creation and the editable install, in both places setup.sh creates a venv (Step 6 cert prep, Step 7 main install). Symptom that surfaces this: pip install -e ".[dev]" outside the script returns ERROR: File "setup.py" or "setup.cfg" not found. Directory cannot be installed in editable mode (...). (A "pyproject.toml" file was found, but editable mode currently requires a setuptools-based build.) Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Summary
Python 3.12's venv module stopped seeding
setuptoolsandwheelby default. The barepip install -e ".[dev]"step insetup.shfails because pip needs setuptools to build the editable install frompyproject.toml. Both attempts in the script (the.[dev]install + the bare.fallback) fail for the same reason, and both errors are silently swallowed by2>/dev/null— leaving the venv with only pip installed and looking superficially "ready."Reproduction
After
setup.shruns cleanly to completion, manually invoking the same install command surfaces the real error:The venv has pip but no setuptools or wheel.
Fix
Add
pip install --quiet --upgrade pip setuptools wheelbetween venv creation and the editable install, in both placessetup.shcreates a venv:Test plan
.venv/, runsetup.shend to end, confirm the editable install succeeds without manual intervention.venv/bin/pip listshowsentrabot+setuptools+wheelafter the script completes🤖 Generated with Claude Code