[Distutils] Wheels and dependent third party dlls on windows

David Genest david.genest at ubisoft.com
Tue Sep 30 15:32:14 CEST 2014


Hi, 

I was wondering what is the recommended approach to bundling runtime dll dependencies when using wheels. 

We are migrating from egg to wheels for environment installation and of various python dependencies. 
Some of those have extension modules, and some have extension modules that depend on the presence 
of a third party dll (in our situation, libzmq-v100-mt-4_0_3.dll).

Up to now, these dlls have been installed by the use of the scripts parameter in the setup command of setup.py, but 
https://mail.python.org/pipermail/distutils-sig/2014-July/024554.html

points to it as not being a good idea.

But the only way to get a dependent dll found on windows is to have it on PATH, and the scripts directory on 
windows is on path when a virtualenv is activated.

I have observed two situations:

1) If we use pip wheel to build the wheel, the scripts parameter is ignored and the dlls do not even get to the archive.
2) If we use setup.py bdist_wheel, the dll gets into the archive, but this relies on the non-documented feature of packaging scripts-as-data of dlls.

What is the correct approach at this time ?

Thanks,

David



More information about the Distutils-SIG mailing list