.envrc: rebuild venv on python version change; install requirements
This commit is contained in:
parent
73a5175a6d
commit
66b0492343
1 changed files with 9 additions and 2 deletions
11
.envrc
11
.envrc
|
@ -1,10 +1,17 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if test -f .venv/bin/python && test "$(realpath .venv/bin/python)" != "$(realpath "$(pyenv which python)")"
|
||||||
|
then
|
||||||
|
echo "rebuilding venv für new python version"
|
||||||
|
rm -rf .venv
|
||||||
|
fi
|
||||||
|
|
||||||
python3 -m venv .venv
|
python3 -m venv .venv
|
||||||
source ./.venv/bin/activate
|
source .venv/bin/activate
|
||||||
PATH_add .venv/bin
|
PATH_add .venv/bin
|
||||||
PATH_add bin
|
PATH_add bin
|
||||||
python3 -m pip install --upgrade pip
|
python3 -m pip install --upgrade pip wheel
|
||||||
|
python3 -m pip install --upgrade -r requirements.txt
|
||||||
|
|
||||||
rm -rf .cache/bw/git_deploy
|
rm -rf .cache/bw/git_deploy
|
||||||
export BW_GIT_DEPLOY_CACHE=.cache/bw/git_deploy
|
export BW_GIT_DEPLOY_CACHE=.cache/bw/git_deploy
|
||||||
|
|
Loading…
Reference in a new issue