pyinstaller/pyinstaller — pull request #6 by itszero (2012-04-14 07:23:24+00:00)
Title: Add hooks to support PyUSB

PyUSB use **ctypes.util.find_library** to load one of its backend library (libusb1.0, libusb0.1, openusb). It is not supported by the pyinstaller's code scanner so the dependent library will not being picked up by pyinstaller.

I wrote a package-time hook to collect one of the available library into the bundle and a run-time hook to make sure it'll pick up the bundled copy not the system one.

This patch has been tested on Win32, Mac, Linux and works on them.