bin/pipekit auto-detects venv; stop rewriting it in deploy.sh.
The tracked launcher now checks for .venv/bin/python3 under the repo and uses it if present, else falls back to system python3. Works pre-deploy (no venv) and post-deploy (venv exists) without being modified. Deploy no longer regenerates the file, so `git pull` on a deployed box won't conflict with the launcher. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
c205b48be2
commit
4650a3cbc5
@ -1,4 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
# Thin launcher: run `pipekit` from anywhere.
|
||||
# Thin launcher: prefer the repo venv if deploy.sh created one,
|
||||
# else fall back to system python3.
|
||||
set -euo pipefail
|
||||
REPO="$(cd "$(dirname "$(readlink -f "$0")")/.." && pwd)"
|
||||
if [ -x "$REPO/.venv/bin/python3" ]; then
|
||||
exec "$REPO/.venv/bin/python3" -m pipekit "$@"
|
||||
fi
|
||||
exec python3 -m pipekit "$@"
|
||||
|
||||
@ -42,11 +42,7 @@ fi
|
||||
"$VENV_DIR/bin/pip" install --quiet -r "$REPO_DIR/requirements.txt"
|
||||
echo "Python deps installed."
|
||||
|
||||
cat > "$REPO_DIR/bin/pipekit" <<EOF
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
exec "$VENV_DIR/bin/python3" -m pipekit "\$@"
|
||||
EOF
|
||||
# The in-repo bin/pipekit auto-detects .venv at runtime; no rewrite needed.
|
||||
chmod +x "$REPO_DIR/bin/pipekit"
|
||||
ln -sf "$REPO_DIR/bin/pipekit" "$LAUNCHER"
|
||||
echo "Launcher: $LAUNCHER -> $REPO_DIR/bin/pipekit"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user