-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.sh
More file actions
executable file
·36 lines (27 loc) · 877 Bytes
/
Copy pathdev.sh
File metadata and controls
executable file
·36 lines (27 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
VENV_DIR="${VENV_DIR:-$ROOT_DIR/venv}"
PYTHON_BIN="${PYTHON_BIN:-python3}"
cd "$ROOT_DIR"
if ! command -v "$PYTHON_BIN" >/dev/null 2>&1; then
echo "Error: $PYTHON_BIN not found"
exit 1
fi
if [ ! -d "$VENV_DIR" ]; then
echo "Creating virtualenv in $VENV_DIR"
"$PYTHON_BIN" -m venv "$VENV_DIR"
fi
source "$VENV_DIR/bin/activate"
echo "Installing runtime dependencies..."
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
if [ "${INSTALL_DEV_DEPS:-1}" = "1" ]; then
echo "Installing dev dependencies..."
python -m pip install -e ".[dev]"
fi
export PYTHONPATH="$ROOT_DIR/src:${PYTHONPATH:-}"
export TOCKERDUI_DEBUG="${TOCKERDUI_DEBUG:-1}"
export PYTHONUNBUFFERED=1
echo "Starting tockerdui (debug mode)..."
exec python -m tockerdui "$@"