mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-04-06 06:03:54 +08:00
* install libusb from pip Use libusb-package to bundle libusb as a Python dependency instead of requiring it as a system package. This simplifies setup on all platforms. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix agnos --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
39 lines
871 B
Bash
Executable File
39 lines
871 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
|
cd $DIR
|
|
|
|
PLATFORM=$(uname -s)
|
|
|
|
echo "installing dependencies"
|
|
if [[ $PLATFORM == "Darwin" ]]; then
|
|
# pass
|
|
:
|
|
elif [[ $PLATFORM == "Linux" ]]; then
|
|
# for AGNOS since we clear the apt lists
|
|
if [[ ! -d /"var/lib/apt/" ]]; then
|
|
sudo apt update
|
|
fi
|
|
|
|
sudo apt-get install -y --no-install-recommends \
|
|
curl ca-certificates gcc git \
|
|
python3-dev
|
|
else
|
|
echo "WARNING: unsupported platform. skipping apt/brew install."
|
|
fi
|
|
|
|
if ! command -v uv &>/dev/null; then
|
|
echo "'uv' is not installed. Installing 'uv'..."
|
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
|
|
# doesn't require sourcing on all platforms
|
|
set +e
|
|
source $HOME/.local/bin/env
|
|
set -e
|
|
fi
|
|
|
|
export UV_PROJECT_ENVIRONMENT="$DIR/.venv"
|
|
uv sync --all-extras --upgrade
|
|
source "$DIR/.venv/bin/activate"
|