Closed cdwilson closed 4 months ago
Should this also check the existence of the the homebrew environment variable?
I feel like it might be better to warn the user if the libusb dylib isn't found, and give them advice on fixing that, rather than just tweaking the search path internally in libgreat
(or in any of our other Python projects).
Otherwise you get a quite confusing situation where scripts using our libraries will work, but other software, or users' own scripts using pyusb
or libusb1
directly, will not work.
@martinling that makes sense, I'll close this out in favor of what you are suggesting.
Potential fix for https://github.com/greatscottgadgets/cynthion/issues/136
Homebrew patches it's own python so that
ctypes.find_library
can find libraries also installed by homebrew. When using a version of python not installed by Homebrew, this setsDYLD_FALLBACK_LIBRARY_PATH
so that the homebrew-installedlibusb
library is found.I tested this on my ARM Mac, but I don't have an Intel Mac to test this with. Can somebody with an Intel Mac try this out and see if it also works for them?