Let the gate bootstrap itself inside a uv venv, which has no pip
Some checks failed
crdt-sync pre-commit / pre-commit (push) Waiting to run
crdt-sync tests / test (push) Waiting to run
dependency freshness / dependencies on newest stable (push) Waiting to run
file length / file-length (push) Waiting to run
gatelock pre-commit / pre-commit (push) Waiting to run
gatelock tests / test (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
palette drift / palette (push) Waiting to run
shared gate tests / gate unit tests (push) Waiting to run
web_ui tests / test (push) Has been cancelled

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Krzysztof Rudnicki 2026-08-28 21:09:47 +02:00
parent 3565b281ca
commit b914cc87fb

View File

@ -53,6 +53,10 @@ ensure_runtime_deps() {
fi
echo "dependency-freshness: installing pyyaml/packaging for $(python3 -V 2>&1)" >&2
python3 -m pip install --quiet --disable-pip-version-check pyyaml packaging >&2 || true
# A `uv venv` ships no pip at all, and those are most of this fleet now.
if ! python3 -c 'import yaml, packaging' 2>/dev/null && has_uv; then
uv pip install --quiet --python "$(command -v python3)" pyyaml packaging >&2 || true
fi
if ! python3 -c 'import yaml, packaging' 2>/dev/null; then
echo "Error: the gate needs pyyaml and packaging under $(command -v python3)." >&2
echo "Install them there, or run the gate with a different interpreter." >&2
@ -60,4 +64,8 @@ ensure_runtime_deps() {
fi
}
has_uv() {
command -v uv >/dev/null 2>&1
}
main "$@"