15 lines
286 B
Plaintext
Executable File
15 lines
286 B
Plaintext
Executable File
# Run with `source pyvenv`
|
|
|
|
if [ -n "${VIRTUAL_ENV:-}" ]; then
|
|
return 0
|
|
fi
|
|
|
|
if [ ! -f .venv/bin/activate ]; then
|
|
python3 -m venv .venv || return $?
|
|
if [ -f requirements.txt ]; then
|
|
.venv/bin/python -m pip install -r requirements.txt || return $?
|
|
fi
|
|
fi
|
|
|
|
. .venv/bin/activate
|