mac-can / PCBUSB-Library

macOS® User-Space Driver for PCAN-USB Interfaces (Binaries only)
https://mac-can.com
Other
29 stars 0 forks source link

Distribute as a Python Pip Package? #5

Open emrainey opened 2 years ago

emrainey commented 2 years ago

It would be useful for users to be able to pip install pcanbasic so that can use your python library without having to manually install it themselves. I think It would have to: 1.) Install PCANBasic.py into the site-packages (pip does this for you if you follow the proper layout) 2.) Install libPCBUSB.0.10.1.dylib into a known location, like /usr/local/lib then run ldconfig. This might be some custom code.

Users would then run:

$ python3 -m pip install pcanbasic

Then in their python code they can just import it

# import the class PCANBasic from the module named PCANBasic
from PCANBasic import PCANBasic

And it works!