first commit
This commit is contained in:
21
scripts/create_venv.sh
Executable file
21
scripts/create_venv.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
DEFAULT_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
||||
PROJECT_ROOT="${PROJECT_ROOT:-${DEFAULT_ROOT}}"
|
||||
PYTHON_BIN="${PYTHON_BIN:-python3}"
|
||||
|
||||
if ! command -v "${PYTHON_BIN}" >/dev/null 2>&1; then
|
||||
echo "Python executable not found: ${PYTHON_BIN}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "${PROJECT_ROOT}"
|
||||
|
||||
"${PYTHON_BIN}" -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install -r backend/requirements.txt
|
||||
|
||||
echo "Virtualenv ready at ${PROJECT_ROOT}/.venv"
|
||||
Reference in New Issue
Block a user