diff --git a/.gitmodules b/.gitmodules index ad6530de9ac910..aeb57ba023ec03 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "panda"] - path = panda - url = ../../commaai/panda.git [submodule "opendbc"] path = opendbc_repo url = ../../commaai/opendbc.git diff --git a/SConstruct b/SConstruct index 119209dcdbb316..9af1b77eb64a46 100644 --- a/SConstruct +++ b/SConstruct @@ -6,6 +6,7 @@ import platform import shlex import importlib import numpy as np +import panda import SCons.Errors from SCons.Defaults import _stripixes @@ -79,6 +80,10 @@ def _libflags(target, source, env, for_signature): return _stripixes(env['LIBLINKPREFIX'], libs, env['LIBLINKSUFFIX'], env['LIBPREFIXES'], env['LIBSUFFIXES'], env, env['LIBLITERALPREFIX']) +# dynamic path for panda +PANDA_DIR = os.path.dirname(panda.__file__) +SITE_PACKAGES_DIR = os.path.dirname(PANDA_DIR) + env = Environment( ENV={ "PATH": os.environ['PATH'], @@ -113,6 +118,8 @@ env = Environment( "#third_party/acados/include/hpipm/include", "#third_party/catch2/include", [x.INCLUDE_DIR for x in pkgs], + PANDA_DIR, + SITE_PACKAGES_DIR, ], LIBPATH=[ "#common", @@ -227,8 +234,9 @@ messaging = [socketmaster, msgq, 'capnp', 'kj',] Export('messaging') -# Build other submodules -SConscript(['panda/SConscript']) +# replaced hardcoded call to remove dependency on panda submodule +panda_sconscript = os.path.join(PANDA_DIR, 'SConscript') +SConscript(panda_sconscript, variant_dir='build/panda', duplicate=0) # Build rednose library SConscript(['rednose/SConscript']) diff --git a/panda b/panda deleted file mode 160000 index b19b66a6f0a246..00000000000000 --- a/panda +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b19b66a6f0a246729953cb19390dbee1e93610b2 diff --git a/pyproject.toml b/pyproject.toml index d7af83d40751a9..de5b645a35157c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,6 +45,7 @@ dependencies = [ "aiortc", # panda + "pandacan @ git+https://github.com/adwit-agg/panda.git@fix-pip-package", "libusb1", "spidev; platform_system == 'Linux'", diff --git a/uv.lock b/uv.lock index f8278c13681bcf..364fb57c90191c 100644 --- a/uv.lock +++ b/uv.lock @@ -497,6 +497,15 @@ name = "imgui" version = "1.92.7" source = { git = "https://github.com/commaai/dependencies.git?subdirectory=imgui&rev=release-imgui#58d66087adacabb2bb4e56e74ebdea7d55c78e34" } +[[package]] +name = "importlib-resources" +version = "7.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e4/06/b56dfa750b44e86157093bc8fca0ab81dccbf5260510de4eaf1cb69b5b99/importlib_resources-7.1.0.tar.gz", hash = "sha256:0722d4c6212489c530f2a145a34c0a7a3b4721bc96a15fada5930e2a0b760708", size = 44985, upload-time = "2026-04-12T16:36:09.232Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8a/db/55a262f3606bebcae07cc14095338471ad7c0bbcaa37707e6f0ee49725b7/importlib_resources-7.1.0-py3-none-any.whl", hash = "sha256:1bd7b48b4088eddb2cd16382150bb515af0bd2c70128194392725f82ad2c96a1", size = 37232, upload-time = "2026-04-12T16:36:08.219Z" }, +] + [[package]] name = "iniconfig" version = "2.3.0" @@ -582,6 +591,26 @@ name = "libusb" version = "1.0.29" source = { git = "https://github.com/commaai/dependencies.git?subdirectory=libusb&rev=release-libusb#222120c19c857d6d0a681aff2e335c829ffcf89c" } +[[package]] +name = "libusb-package" +version = "1.0.26.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "importlib-resources" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/2e/f6/83e13936b5799360eae8f0e31b5b298dd092451b91136d7cd13852777954/libusb_package-1.0.26.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c9404298485762a4e73b416e8a3208d33aa3274fb9b870c2a1cacba7e2918f19", size = 62045, upload-time = "2025-04-01T12:59:16.817Z" }, + { url = "https://files.pythonhosted.org/packages/33/97/86ed73880b6734c9383be5f34061b541e8fe5bd0303580b1f5abe2962d58/libusb_package-1.0.26.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8126f6711318dad4cb2805ea20cd47b895a847207087d8fdb032e082dd7a2e24", size = 59502, upload-time = "2025-04-01T12:59:17.72Z" }, + { url = "https://files.pythonhosted.org/packages/95/f7/27b67b8fe63450abf0b0b66aacf75d5d64cdf30317e214409ceb534f34b4/libusb_package-1.0.26.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:11c219366e4a2368117b9a9807261f3506b5623531f8b8ce41af5bbaec8156a0", size = 70247, upload-time = "2025-04-01T14:53:14.387Z" }, + { url = "https://files.pythonhosted.org/packages/8c/11/613543f9c6dab5a82eefd0c78d52d08b5d9eb93a0362151fbedf74b32541/libusb_package-1.0.26.3-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8809a50d8ab84297344c54e862027090c0d73b14abef843a8b5f783313f49457", size = 74537, upload-time = "2025-04-01T14:53:15.345Z" }, + { url = "https://files.pythonhosted.org/packages/f0/43/5a2331615693b56221a902869fb2094d9a0b9a764a8706c8ba16e915f77c/libusb_package-1.0.26.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a83067c3dfdbb3856badb4532eaea22e8502b52ce4245f5ab46acf93d7fbd471", size = 70652, upload-time = "2025-04-01T14:53:16.319Z" }, + { url = "https://files.pythonhosted.org/packages/44/1a/186d4ec86421b69feb45e214edb5301fbcb9e8dc9df963678aeff1a447d5/libusb_package-1.0.26.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b56be087ea9cde8e50fb02740a4f0cefb6f63c61ac2e7812a9244487614a3973", size = 71860, upload-time = "2025-04-01T14:53:17.87Z" }, + { url = "https://files.pythonhosted.org/packages/4b/3c/8cebdad822d7bfcb683a77d5fd113fbc6f72516cfb7c1c3a274fefafa8e9/libusb_package-1.0.26.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:ea0f6bf40e54b1671e763e40c9dbed46bf7f596a4cd98b7c827e147f176d8c97", size = 76476, upload-time = "2025-04-01T14:53:19.202Z" }, + { url = "https://files.pythonhosted.org/packages/49/5f/30c625b6c4ecd14871644c1d16e97d7c971f82a0f87a9cfa81022f85bcfc/libusb_package-1.0.26.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b40f77df991c6db8621de9575504886eca03a00277e521a4d64b66cbef8f6997", size = 71037, upload-time = "2025-04-01T14:53:21.359Z" }, + { url = "https://files.pythonhosted.org/packages/7f/e9/3aa3ff3242867b7f22ee3ce28d0e93ff88547f170ca1b8a6edc59660d974/libusb_package-1.0.26.3-cp312-cp312-win32.whl", hash = "sha256:6eee99c9fde137443869c8604d0c01b2127a9545ebc59d06a3376cf1d891e786", size = 77642, upload-time = "2025-04-01T12:58:05.471Z" }, + { url = "https://files.pythonhosted.org/packages/15/0e/913ddb1849f828fc385438874c34541939d9b06c0e5616f48f24cddd24de/libusb_package-1.0.26.3-cp312-cp312-win_amd64.whl", hash = "sha256:5e09c0b6b3cd475841cffe78e46e91df58f0c6c02ea105ea1a4d0755a07c8006", size = 90593, upload-time = "2025-04-01T12:58:06.798Z" }, +] + [[package]] name = "libusb1" version = "3.3.1" @@ -740,6 +769,17 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/4a/90/b338326131ccb2aaa3c2c85d00f41822c0050139a4bfe723cfd95455bd2d/opencv_python_headless-4.13.0.92-cp37-abi3-win_amd64.whl", hash = "sha256:77a82fe35ddcec0f62c15f2ba8a12ecc2ed4207c17b0902c7a3151ae29f37fb6", size = 40070414, upload-time = "2026-02-05T07:02:26.448Z" }, ] +[[package]] +name = "opendbc" +version = "0.3.1" +source = { git = "https://github.com/commaai/opendbc.git?rev=master#ae565244a5441ff06bb19bf42dcbc299e6128455" } +dependencies = [ + { name = "numpy" }, + { name = "pycapnp" }, + { name = "pycryptodome" }, + { name = "tqdm" }, +] + [[package]] name = "openpilot" version = "0.1.0" @@ -767,6 +807,7 @@ dependencies = [ { name = "libyuv" }, { name = "ncurses" }, { name = "numpy" }, + { name = "pandacan" }, { name = "pillow" }, { name = "psutil" }, { name = "pycapnp" }, @@ -852,6 +893,7 @@ requires-dist = [ { name = "ncurses", git = "https://github.com/commaai/dependencies.git?subdirectory=ncurses&rev=release-ncurses" }, { name = "numpy", specifier = ">=2.0" }, { name = "opencv-python-headless", marker = "extra == 'dev'" }, + { name = "pandacan", git = "https://github.com/adwit-agg/panda.git?rev=fix-pip-package" }, { name = "pillow" }, { name = "pre-commit-hooks", marker = "extra == 'testing'" }, { name = "psutil" }, @@ -936,6 +978,16 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/11/5d/3744c6550dddf933785a37cdd4a9921fe13284e6d115b5a2637fe390f158/panda3d_simplepbr-0.13.1-py3-none-any.whl", hash = "sha256:cda41cb57cff035b851646956cfbdcc408bee42511dabd4f2d7bd4fbf48c57a9", size = 2457097, upload-time = "2025-03-30T16:57:39.729Z" }, ] +[[package]] +name = "pandacan" +version = "0.0.10" +source = { git = "https://github.com/adwit-agg/panda.git?rev=fix-pip-package#f38fa75a1e63719b16024b6697c88d95d7e521c7" } +dependencies = [ + { name = "libusb-package" }, + { name = "libusb1" }, + { name = "opendbc" }, +] + [[package]] name = "pillow" version = "12.2.0"