[Distutils] Wheels and dependent third party dlls on windows

David Cournapeau cournape at gmail.com
Tue Sep 30 22:47:59 CEST 2014


On Tue, Sep 30, 2014 at 3:31 PM, David Genest <david.genest at ubisoft.com>
wrote:

>
> > This is not true. Python loads DLLs with LOAD_WITH_ALTERED_SEARCH_PATH,
> to allow them to be located alongside the pyd file. You should therefore be
> able to ship the
> > dependent dll in the package directory (which wheels support fine).
>
> > Paul
>
> Ok, so what if the dll is shared in a given environment (multiple
> extensions use it)?,  the shared dll should be copied to every package?
> Won't that cause multiple loads by the system?
>

Yes it will, and it is indeed problematic. There are no great solutions:

 - bundle it in your package
 - have a separate wheel and then put it in PATH
 - have a separate wheel but use preload tricks (e.g. using ctypes) to
avoid using PATH

There are better solutions if one can patch python itself, though that's
obviously not practical in most cases.

David


> Thanks for your response,
>
> D.
>
>
>
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> https://mail.python.org/mailman/listinfo/distutils-sig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20140930/3bb4e01a/attachment.html>


More information about the Distutils-SIG mailing list