From c4341242bac65f2e5f30aeaeafedc61333e10dfd Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Tue, 6 Aug 2024 16:20:23 +0100 Subject: [PATCH] Update python env template --- templates | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates b/templates index 38021a7..104611b 100644 --- a/templates +++ b/templates @@ -210,8 +210,10 @@ envrc-file-mode "PYTHON=\"$(nix build " (p "nixpkgs#python3Full") " --print-out-paths --no-link)/bin/python3\"" n "VENV_DIR=" (p ".venv") n "export LD_LIBRARY_PATH=\"$CC/lib\":\"$ZLIB/lib\"" n - "if [ ! -f $VENV_DIR/bin/python3 ]; then" n - > "$PYTHON -m venv $VENV_DIR" n + "if [ ! -f $VENV_DIR/bin/activate ]; then" n + > "$PYTHON -m venv --clear $VENV_DIR" n + "else" n + > "$PYTHON -m venv --upgrade $VENV_DIR" "fi" n "source $VENV_DIR/bin/activate")