panda icon indicating copy to clipboard operation
panda copied to clipboard

Setup proper pip package

Open adeebshihadeh opened this issue 5 months ago • 6 comments

pandacan is already a pip package, but it doesn't include the FW and some other things to fully use the panda project.

The package should be sufficient to remove panda as a submodule from openpilot and add it as a normal Python dependency to the pyproject.toml. For validation, make an openpilot PR that does this and ensure CI passes.

adeebshihadeh avatar Jul 25 '25 20:07 adeebshihadeh

@adeebshihadeh can I work on this one ?

shreyanshjain7174 avatar Jul 26 '25 05:07 shreyanshjain7174

Created PR #2241 to implement comprehensive pip package with all necessary components including firmware, certificates, and build tools. The package enables openpilot to replace git submodule usage with standard pip installation.

shreyanshjain7174 avatar Jul 26 '25 07:07 shreyanshjain7174

This PR converts the panda repository to be pip-installable so openpilot can use it as a normal Python dependency instead of a git submodule.

Changes:

Add pyproject.toml package configuration Add setup.py for pip compatibility Export USBPACKET_MAX_SIZE constant needed by tests The package installs as "panda" and maintains all existing import paths.

shreyanshjain7174 avatar Jul 26 '25 07:07 shreyanshjain7174

I have prepared https://github.com/commaai/openpilot/pull/36034 that can be used when pandacan 0.0.10 is published on pypi

jaumebalust avatar Aug 20 '25 04:08 jaumebalust

Hi I am working on the issue, I have built the firmware, right now when python -m build runs, the firmware gets built and we get .elf, .signed and .bin files in the whl, when I test this panda build in openpilot I noticed that we have these imports

openpilot/tools/cabana/panda.h

#include "panda/board/health.h"
#include "panda/board/can.h"

do u want .h files in the panda build?

prayanshchh avatar Sep 18 '25 14:09 prayanshchh

Yes, you can see how opendbc does this.

adeebshihadeh avatar Sep 18 '25 14:09 adeebshihadeh