This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xoviat
Recipients xoviat
Date 2018-01-07.22:41:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1515364906.74.0.467229070634.issue32516@psf.upfronthosting.co.za>
In-reply-to
Content
On linux and macOS, a mechanism exists to relocate shared libraries inside of a wheel. Auditwheel creates a .libs folder and places the shared libraries inside of it. The problem is that on Windows, the rpath mechanism doesn't exist. We've attempted to ameliorate the situation with NumPy by modifying the DLL search path ourselves. I think this should be done in Python itself.

Here is what I propose: for each folder in site packages that matches the foldername created by auditwheel, specifically:

1. A folder directly inside site-packages that ends with '.libs'
2. A folder two levels under site-packages that is named 'libs'

Python should add these folders to the DLL search path at some point before the matching extensions are imported, so that DLLs located in these paths can be imported by a call to LoadLibrary.

The reason that this should be done in Python is that packages shouldn't be modifying the DLL search path, but that's currently what's required.

The alternative, current, recommendation is to place shared libraries in the same folder as the extension, but this approach fails when the shared library needs to be shared between more than one extension in different subpackages, but in the same distribution package.
History
Date User Action Args
2018-01-07 22:41:46xoviatsetrecipients: + xoviat
2018-01-07 22:41:46xoviatsetmessageid: <1515364906.74.0.467229070634.issue32516@psf.upfronthosting.co.za>
2018-01-07 22:41:46xoviatlinkissue32516 messages
2018-01-07 22:41:46xoviatcreate