vpelletier / python-libusb1

Python ctype-based wrapper around libusb1
GNU Lesser General Public License v2.1
174 stars 67 forks source link

better windows support for loading libusb-1.0.dll #26

Closed VonAncken closed 3 years ago

VonAncken commented 7 years ago

try to find dll in sys.path

vpelletier commented 7 years ago

Python's ctype library loader is supposed to follow the semantics of platform's library lookup order, so I wonder if it wouldn't be cleaner to configure that before importing usb1.

On glibc-based system, this would be using LD_LIBRARY_PATH environment variable. On windows it seems PATH does the trick (along with a few other mechanisms I'm not familiar with). Maybe your entry point, or an __init__.py somewhere, would be a convenient place to do such environment setup ?

vpelletier commented 3 years ago

I believe this is superseded by work done in #62 , soon to be released.