Files
agnos-builder/sync_openpilot_dependencies.sh
T
Adeeb Shihadeh 903814b595 pull in all
2026-08-04 19:37:19 -07:00

24 lines
844 B
Bash
Executable File

#!/usr/bin/env bash
set -e
# Make sure we're in the correct spot
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
cd $DIR
if ! command -v "uv" > /dev/null 2>&1; then
echo "installing uv..."
curl -LsSf https://astral.sh/uv/install.sh | sh
fi
cd userspace/uv
curl -sSo openpilot/pyproject.toml https://raw.githubusercontent.com/commaai/openpilot/master/pyproject.toml
# Replace openpilot's checkout-relative submodule sources with the Git sources
# configured by AGNOS below. The lockfile pins each resolved commit.
sed -i '/^\[tool\.uv\.sources\]/,$d' openpilot/pyproject.toml
sed -i '${/^$/d;}' openpilot/pyproject.toml
pc="$(python3 -c "import sysconfig;print(sysconfig.get_config_vars('installed_base')[0])")" && \
pcpath=$pc"/lib/pkgconfig" && \
export PKG_CONFIG_PATH="$pcpath:$PKG_CONFIG_PATH" && \
uv lock --upgrade