-
Notifications
You must be signed in to change notification settings - Fork 876
Setup proper pip package with CLI tools and optional dependencies #2243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Made opendbc an optional dependency to prevent installation conflicts - Added CLI entry points for panda-flash and panda-recover commands - Created CLI module to wrap existing flash/recover functionality - Fixed imports to work with or without opendbc installed - Added MANIFEST.in to include all necessary files in distribution - Configured package-data to include firmware, certs, and build tools This allows pandacan to be installed as a standard pip package and enables replacing the panda git submodule in openpilot with a regular Python dependency. Fixes commaai#2239
- Remove unused noqa directive - Remove whitespace from blank line
python/__init__.py
Outdated
| try: | ||
| from opendbc.car.structs import CarParams | ||
| except ImportError: | ||
| # opendbc is optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is it optional? it shouldn't be
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the firmware should be built and packaged at the pandacan package build time
|
also where's the openpilot PR for validation? |
|
@adeebshihadeh raising the pr for validation |
|
commaai/openpilot#35857 pr in openpilot |
done |
|
The comments weren't addressed. Please do not open another PR unless it's a serious attempt. |
Setup proper pip package
Fixes #2239
Description
This PR implements a comprehensive pip package for panda that includes firmware, certificates, build tools, and CLI entry points. This enables panda to be installed as a standard Python dependency, allowing openpilot to replace the git submodule with a pip installation.
Changes
opendbcan optional dependency to prevent installation conflictspanda-flashandpanda-recovercommandspython/cli.py) to wrap existing flash/recover functionalityMANIFEST.into include all necessary files in distribution__version__at package levelInstallation Options
CLI Tools
After installation, the following commands are available:
panda-flash- Flash panda device(s) with latest firmwarepanda-recover- Recover panda device(s) via DFU modeTesting
python -m buildDemo Video
Screencast.from.2025-07-26.13-49-24.mp4
Notes