From 2e9fa514bb77df3a2a06012a6fe7bef99d07f66e Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sun, 21 Jun 2026 19:39:21 -0700 Subject: [PATCH] simple pip install test (#38218) * fails * lil more * try that --- pyproject.toml | 10 +++++++++- scripts/test_pip_install.sh | 22 ++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100755 scripts/test_pip_install.sh diff --git a/pyproject.toml b/pyproject.toml index 54f67d6299..15efc934fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -121,7 +121,15 @@ requires = ["hatchling"] build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] -packages = [ "." ] +packages = [ + "openpilot", + "msgq", + "opendbc", + "panda", + "rednose", + "teleoprtc", + "tinygrad", +] [tool.hatch.metadata] allow-direct-references = true diff --git a/scripts/test_pip_install.sh b/scripts/test_pip_install.sh new file mode 100755 index 0000000000..d2dbedff0a --- /dev/null +++ b/scripts/test_pip_install.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -euxo pipefail + +SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(git -C "$SCRIPT_DIR/.." rev-parse --show-toplevel)" +PYTHON_VERSION="$(cat "$REPO_ROOT/.python-version")" +PACKAGE="${1:-$REPO_ROOT}" + +TMPDIR="$(mktemp -d)" +trap 'rm -rf "$TMPDIR"' EXIT + +cd "$TMPDIR" + +uv venv --python "$PYTHON_VERSION" +source .venv/bin/activate +uv pip install "$PACKAGE" +python3 - <<'PY' +from openpilot.tools.lib.logreader import LogReader + +assert LogReader.__name__ == "LogReader" +print("ok: imported LogReader") +PY