easier python env

This commit is contained in:
2026-11-30 21:48:11 +01:00
parent c2bd4d9468
commit 4f051082a3
Executable
+14
View File
@@ -0,0 +1,14 @@
# 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