Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion scripts/install-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT_DIR"

python3 -m venv .venv
# skill-manager requires Python 3.11+. The bare `python3` on a machine may be
# older (e.g. 3.9), which silently resolves incompatible dependency versions,
# so pick the first interpreter that satisfies the minimum.
find_python() {
for candidate in python3.14 python3.13 python3.12 python3.11 python3; do
if command -v "$candidate" >/dev/null 2>&1 \
&& "$candidate" -c 'import sys; sys.exit(0 if sys.version_info >= (3, 11) else 1)'; then
echo "$candidate"
return 0
fi
done
return 1
}

PYTHON="$(find_python)" || {
echo "error: Python 3.11+ is required but was not found on PATH." >&2
exit 1
}
echo "Using $("$PYTHON" --version) ($PYTHON)"

"$PYTHON" -m venv .venv
"$ROOT_DIR/.venv/bin/python" -m pip install --upgrade pip
"$ROOT_DIR/.venv/bin/pip" install -r requirements.txt
npm install