'libusb0.dll' is excluded in `hook-usb` on Windows platform
The reason is that the `_resolveCtypesImports(['libusb0.dll'])` method will return empty on Windows( not test other platform):
https://github.com/pyinstaller/pyinstaller-hooks-contrib/blob/f89be6debff540da250850f91e0a67021e3f12bc/_pyinstaller_hooks_contrib/stdhooks/hook-usb.py#L52
and _resolveCtypesImports will call:
https://github.com/pyinstaller/pyinstaller/blob/c04bea46d83ac4d5c955d2f0140df621740e9941/PyInstaller/depend/utils.py#L244
finally call:
https://github.com/pyinstaller/pyinstaller/blob/c04bea46d83ac4d5c955d2f0140df621740e9941/PyInstaller/depend/dylib.py#L327
here `check_library` will exclude everything from the Windows directory:
https://github.com/pyinstaller/pyinstaller/blob/c04bea46d83ac4d5c955d2f0140df621740e9941/PyInstaller/depend/dylib.py#L299-L312
hope for fix it
关闭于 2025-05-06 0 条评论