heroweb/install.sh

24 lines
668 B
Bash
Raw Permalink Normal View History

2024-08-22 10:09:10 +00:00
#!/bin/bash
set -ex
2024-09-14 03:59:42 +00:00
BASE_DIR="$(cd "$(dirname "$SCRIPT_PATH")" && pwd)"
if [ -z "$CONTEXTROOT" ]; then
source ${BASE_DIR}/myenv.sh
fi
2024-08-22 10:09:10 +00:00
cd $BASE_DIR
2024-09-09 03:56:44 +00:00
python3 -m pip install -r "$BASE_DIR/requirements.txt"
2024-08-22 10:09:10 +00:00
2024-09-09 03:56:44 +00:00
herolib='~/code/git.ourworld.tf/projectmycelium/hero_server/lib'
herolib=$(eval echo $herolib)
2024-08-22 10:09:10 +00:00
2024-09-09 03:56:44 +00:00
PYTHON_VERSION=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
2024-08-22 10:09:10 +00:00
2024-09-09 03:56:44 +00:00
echo "$BASE_DIR/lib" > "${VENV_DIR}/lib/python${PYTHON_VERSION}/site-packages/weblib.pth"
echo "$herolib" > "${VENV_DIR}/lib/python${PYTHON_VERSION}/site-packages/herolib.pth"
2024-08-22 10:09:10 +00:00
echo "OK"
2024-09-09 03:56:44 +00:00
python3 -m pip install -r "requirements.txt"
2024-08-22 10:09:10 +00:00
pip install --upgrade pip