openant icon indicating copy to clipboard operation
openant copied to clipboard

new feature: support for environmental variables for USB driver location

Open nno opened this issue 8 years ago • 2 comments

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.

nno avatar Jul 17 '16 09:07 nno

Coverage Status

Coverage decreased (-0.4%) to 51.169% when pulling 69aee52d890a4d8c83b541e41e340ae52e1fc275 on nno:_enh/library_path into 768c87d6d04fbe3ded2aa3e1a5ec7d06b23b7aa8 on Tigge:master.

coveralls avatar Jul 17 '16 09:07 coveralls

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

Tigge avatar Sep 23 '16 20:09 Tigge

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.

tuna-f1sh avatar Jan 27 '23 13:01 tuna-f1sh