Adjust pyshell to upgrade existing env in case python is upgraded
This commit is contained in:
parent
0f9654b200
commit
d4af74913e
|
@ -31,7 +31,11 @@ pkgs.mkShellNoCC {
|
||||||
pkgs.uv
|
pkgs.uv
|
||||||
] ++ extraPackages;
|
] ++ extraPackages;
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
[ ! -d .venv ] && ${pythonWrapped}/bin/python3 -m venv .venv
|
if [ ! -d .venv ]; then
|
||||||
|
${pythonWrapped}/bin/python3 -m venv .venv
|
||||||
|
else
|
||||||
|
${pythonWrapped}/bin/python3 -m venv --upgrade .venv
|
||||||
|
fi
|
||||||
[ -f .venv/bin/activate ] && source .venv/bin/activate
|
[ -f .venv/bin/activate ] && source .venv/bin/activate
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue