Move setting of venv prompt in template

This commit is contained in:
Evie Litherland-Smith 2023-05-22 10:39:40 +01:00
parent 4afbecf78c
commit 5a94a69786

View file

@ -3,7 +3,7 @@ pkgs.mkShell {
nativeBuildInputs = with pkgs; [python39 poetry git]; nativeBuildInputs = with pkgs; [python39 poetry git];
shellHook = '' shellHook = ''
export PROJECT_NAME=$(basename $(readlink -f .)) export PROJECT_NAME=$(basename $(readlink -f .))
[ -e .venv/bin/python3 ] && VENV_FLAG="--upgrade" || VENV_FLAG="--clear --prompt $PROJECT_NAME"; python3 -m venv $VENV_FLAG .venv [ -e .venv/bin/python3 ] && VENV_FLAG="--upgrade" || VENV_FLAG="--clear"; python3 -m venv --prompt $PROJECT_NAME $VENV_FLAG .venv
[ -e .venv/bin/activate ] && source .venv/bin/activate [ -e .venv/bin/activate ] && source .venv/bin/activate
''; '';
} }