From b914cc87fbd284a1bc3b8a227d461e46f3769052 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Fri, 28 Aug 2026 21:09:47 +0200 Subject: [PATCH] Let the gate bootstrap itself inside a uv venv, which has no pip Co-Authored-By: Claude Opus 5 (1M context) --- scripts/check_dependency_freshness.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/check_dependency_freshness.sh b/scripts/check_dependency_freshness.sh index b91fa65..e6ca6f7 100755 --- a/scripts/check_dependency_freshness.sh +++ b/scripts/check_dependency_freshness.sh @@ -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 "$@"