diff --git a/bin/pipekit b/bin/pipekit index a7f397c..24a3cfe 100755 --- a/bin/pipekit +++ b/bin/pipekit @@ -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 "$@" diff --git a/deploy.sh b/deploy.sh index 2790150..3f80b80 100755 --- a/deploy.sh +++ b/deploy.sh @@ -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" < $REPO_DIR/bin/pipekit"