[Distutils] Wheels and dependent third party dlls on windows

Steve Dower Steve.Dower at microsoft.com
Wed Oct 1 18:59:16 CEST 2014

David Genest wrote:
> 1) add the dependent dlls to every package that needs it (Steve's answer
> https://mail.python.org/pipermail/distutils-sig/2014-September/024982.html
> concurs that the dependent dll would be loaded only once)

This is the best approach regardless of what else works/doesn't work. Doing this will ensure that your extension module loads the correct dependencies regardless of what other packages or versions are installed in the same environment.

The Scripts folder is not necessarily on the path for all users, and nor is the Python directory itself. Depending on how you launch Python, you may get DLLs loaded from the Python directory or the Scripts directory, but either way you should _always_ get DLLs loaded from the same directory as the extension module. Neither directory is intended to be a dumping ground for all the dependencies used by packages.

I see no reason 'pip wheel' should produce different wheels to bdist_wheel (but perhaps there is one?), so I would consider this a bug.


More information about the Distutils-SIG mailing list