Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
16
tools/unix/helper_python.sh
Normal file
16
tools/unix/helper_python.sh
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
PYTHON="${PYTHON:-python3}"
|
||||
|
||||
function activate_venv_at_path() {
|
||||
path=$1
|
||||
|
||||
if [ ! -d "$path/".venv ]; then
|
||||
"$PYTHON" -m venv "$path"/.venv
|
||||
fi
|
||||
|
||||
source "$path"/.venv/bin/activate
|
||||
|
||||
if [ -f "$path"/requirements.txt ]; then
|
||||
pip install --upgrade pip
|
||||
pip install -r "$path"/requirements.txt
|
||||
fi
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue