From 655edd87a61492c3df2c030e99db6739562aeead Mon Sep 17 00:00:00 2001 From: "B. Brandon Werner" Date: Tue, 9 Jun 2026 11:28:28 -0700 Subject: [PATCH] fix(setup): seed setuptools+wheel before editable install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- scripts/setup.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/setup.sh b/scripts/setup.sh index aa6f4ec..bde1d80 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -868,6 +868,9 @@ if [ ! -d ".venv" ]; then fi # shellcheck disable=SC1091 source .venv/bin/activate +# Python 3.12+ venv no longer seeds setuptools/wheel; editable install from +# pyproject.toml needs both. Seed them before the editable install. +pip install --quiet --upgrade pip setuptools wheel pip install --quiet -e ".[dev]" 2>/dev/null || pip install --quiet -e "." 2>/dev/null VENV_PY="$PROJECT_ROOT/.venv/bin/python3" @@ -1067,6 +1070,9 @@ fi # shellcheck disable=SC1091 source .venv/bin/activate +# Python 3.12+ venv no longer seeds setuptools/wheel; editable install from +# pyproject.toml needs both. Seed them before the editable install. +pip install --quiet --upgrade pip setuptools wheel pip install --quiet -e ".[dev]" success "Installed dependencies (including dev)"