[Numpy-discussion] ANN: NumPy 1.8.1 release
Matthew Brett
matthew.brett at gmail.com
Mon Mar 31 18:09:04 EDT 2014
Hi,
On Mon, Mar 31, 2014 at 12:27 PM, Chris Barker <chris.barker at noaa.gov> wrote:
> On Mon, Mar 31, 2014 at 12:05 PM, Matthew Brett <matthew.brett at gmail.com>
> wrote:
>>
>> > that part, yes, but isn't Linux too much of a varying target for there
>> > to be
>> > any point anyway?
>>
>> You mean, the /usr/lib stuff varies too much, so that any copied
>> dynamic libraries would have little chance of binary compatibility
>> with the system libs?
>
>
> exactly.
>
>> > The "usual" way is to put the dll next to where it is needed. I _think_
>> > a
>> > when a one dll (the pyton extension) is linked to another one, the first
>> > place windows looks is right next to the one loading it -- same as for
>> > dlls
>> > linked to main executables.
>>
>> I had assumed from [1] is that it's the path of the executable not the
>> loading DLL that is on the DLL search path, but I might well be wrong
>
>
> I could be wring, too -- I'm pretty sure I tested this at some point, but It
> could be getting lost in the fog of memory.
I am hopelessly lost here, but it looks as though Python extension
modules get loaded via
hDLL = LoadLibraryEx(pathname, NULL,
LOAD_WITH_ALTERED_SEARCH_PATH);
See: http://hg.python.org/cpython/file/3a1db0d2747e/Python/dynload_win.c#l195
I think this means that the first directory on the search path is
indeed the path containing the extension module:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx#alternate_search_order_for_desktop_applications
So I'm guessing that it would not work putting DLLs into the 'DLLs'
directory - unless the extension modules went in there too. I _think_
(David ?) this means it would not work to copy the dependent DLLs into
sys.exec_prefix
Cheers,
Matthew
More information about the NumPy-Discussion
mailing list