On Tue, Sep 30, 2014 at 3:31 PM, David Genest <david.genest@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.


Thanks for your response,


Distutils-SIG maillist  -  Distutils-SIG@python.org