Skip to content

Commit

Permalink
Merge pull request #1 from themadinventor/bugfix/usb-lib-path
Browse files Browse the repository at this point in the history
Fix pyinstaller#2633: Resolve library name reported by usb.backend in hook-usb
  • Loading branch information
jxltom committed Dec 15, 2017
2 parents 4e8e0ff + 5de8a59 commit 68eb00f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions PyInstaller/hooks/hook-usb.py
Expand Up @@ -40,12 +40,13 @@
binaries = []
for usblib in [getattr(usb.backend, be)._lib for be in backends]:
if usblib is not None:
binaries = [(usblib._name, '')]
binaries = _resolveCtypesImports([os.path.basename(usblib._name)])
assert len(binaries[0]) == 3
binaries = [(binaries[0][1], '')]

except (ValueError, usb.core.USBError) as exc:
logger.warning("%s", exc)


# if nothing found, try to use our custom mechanism
if not binaries:
# Try to resolve your libusb libraries in the following order:
Expand Down

0 comments on commit 68eb00f

Please sign in to comment.