mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 21:13:35 +00:00
[tools] Add generate_subways.sh script
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
ef6ffa299d
commit
01aecbfac4
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
|
||||
}
|
||||
Reference in New Issue
Block a user