openant
openant copied to clipboard
new feature: support for environmental variables for USB driver location
This PR provides support for environmental variables OPEN_ANT_LIBUSB0_BACKEND
, OPEN_ANT_LIBUSB1_BACKEND
, and OPEN_ANT_OPENUSB_BACKEND
. It allows for defining an alternative location for the USB drivers.
Rationale: on my mac, I found that brew
installed the USB driver elsewhere; this PR together with adding
export OPEN_ANT_LIBUSB1_BACKEND=/usr/local/Cellar/libusb/1.0.20/lib/libusb-1.0.dylib
to ~/.bash_profile
allowed openant to find the driver.
Coverage decreased (-0.4%) to 51.169% when pulling 69aee52d890a4d8c83b541e41e340ae52e1fc275 on nno:_enh/library_path into 768c87d6d04fbe3ded2aa3e1a5ec7d06b23b7aa8 on Tigge:master.
It should definitely be able to get this to work on OS X but I wonder if something like this should be necessary. If libusb and python both where installed by homebrew it really should work (I hope). Are you using python from brew or from the os?
There are some pointers in https://sourceforge.net/p/pyusb/mailman/pyusb-users/thread/[email protected]/ as well that could work. Have you tried these? If there are some good combination here we should get that into the readme, or if there are not a good way to do this then this addition could be a good idea as well.
I'm really sorry for the delay in reviewing this.
Edit: Some info regarding default python in http://stackoverflow.com/questions/5157678/python-homebrew-by-default or https://gist.github.com/Bouke/11261620
Since this is seven years old and I use on macOS with Homebrew installed libusb without issue, I'm putting this down to specific environment and closing.