Files
sunnypilot/tools/install_python_dependencies.sh
github-actions[bot] 9f226a4f5e sunnypilot v2026.01.14-3989
version: sunnypilot v2025.003.000 (feature-branch)
date: 2026-01-14T04:01:43
master commit: 89a3a953b2
2026-01-14 04:01:43 +00:00

32 lines
856 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# Increase the pip timeout to handle TimeoutError
export PIP_DEFAULT_TIMEOUT=200
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
ROOT="$DIR"/../
cd "$ROOT"
if ! command -v "uv" > /dev/null 2>&1; then
echo "installing uv..."
curl -LsSf --retry 5 --retry-delay 5 --retry-all-errors https://astral.sh/uv/install.sh | sh
UV_BIN="$HOME/.local/bin"
PATH="$UV_BIN:$PATH"
fi
echo "updating uv..."
# ok to fail, can also fail due to installing with brew
uv self update || true
echo "installing python packages..."
uv sync --frozen --all-extras
source .venv/bin/activate
if [[ "$(uname)" == 'Darwin' ]]; then
touch "$ROOT"/.env
echo "# msgq doesn't work on mac" >> "$ROOT"/.env
echo "export ZMQ=1" >> "$ROOT"/.env
echo "export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES" >> "$ROOT"/.env
fi