Update python envrc template
Move python version to local variable to be easy to change Prompt for python version and venv directory to use with previous behaviour as default
This commit is contained in:
parent
29e1df8e76
commit
4828d8e671
|
@ -207,10 +207,11 @@ envrc-file-mode
|
||||||
|
|
||||||
(python "CC=\"$(nix build nixpkgs#stdenv.cc.cc.lib --print-out-paths --no-link)\"" n
|
(python "CC=\"$(nix build nixpkgs#stdenv.cc.cc.lib --print-out-paths --no-link)\"" n
|
||||||
"ZLIB=\"$(nix build nixpkgs#zlib --print-out-paths --no-link)\"" n
|
"ZLIB=\"$(nix build nixpkgs#zlib --print-out-paths --no-link)\"" n
|
||||||
|
"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
|
"export LD_LIBRARY_PATH=\"$CC/lib\":\"$ZLIB/lib\"" n
|
||||||
"VENV_DIR=.venv/" n
|
|
||||||
"if [ ! -f $VENV_DIR/bin/python3 ]; then" n
|
"if [ ! -f $VENV_DIR/bin/python3 ]; then" n
|
||||||
> "python3 -m venv $VENV_DIR" n
|
> "$PYTHON -m venv $VENV_DIR" n
|
||||||
"fi" n
|
"fi" n
|
||||||
"source $VENV_DIR/bin/activate")
|
"source $VENV_DIR/bin/activate")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue