[Numpy-discussion] NumPy and Python 2.6 on Windows

David Cournapeau david@ar.media.kyoto-u.ac...
Sat Dec 27 22:45:34 CST 2008

Lenard Lindstrom wrote:
> Sorry for the confusion. I meant that I don't like patching SDL and 
> such. I build these in msys using the "configure; make install" 
> incantation, so can't easily use magic like manifest files.

I don't know about SDL :) numpy needs manifests at the configuration
stage, because it build code snippet which it needs to run, and this
requires manifest AFAIK, if you link against msvcr90.dll. I did not want
to link with another dll at the configuration stage, because this could
lead to subtle issues.

>  Instead I 
> link the DLLs against msvcr71.dll, making sure there are also static 
> libraries, then create the msvcr90.dll linked DLL's from the static 
> libraries. This trick can also be used with the NumPy dependencies Blas 
> and fftw. Actually it is easier, since they are statically linked into 
> NumPy.

Note that numpy does not depend on fftw.

My solution to this was to generate the manifest file, which was
relatively easy to do since we control our build process in python (look
at numpy/distutils/mingw32compiler.py). To run a program 'locally' (one
which is not installed), having the manifest in the same directory as
the .exe is enough, so we only need to generate it. The main difficulty
is to make sure you are using the same version of the dll as python:
this feature has been integrated in python 2.6.1. For 2.6.0, I just
assume it is the same as the official python binary.

> Yes, I've had my run in with manifest files. I avoid them by linking 
> test programs against msvcrt or msvcr71 instead. A manifest is not 
> needed for a DLL, luckily, as it uses the DLL libraries loaded by its 
> host program.

Yes, that's my understanding too. Since this is of course undocumented,
we can only guess.

>  And I've had no luck using msvcr90.dll outside an SxS 
> assembly. It needs a manifest file wherever it is, and I have had yet to 
> writing a working manifest for a private assembly. So the Python 
> developers' solution of copying msvcr90.dll into the Python directory is 
> of no help.

This may be of some interest for you:


that's a summary of my own findings about manifest using only open
source tools. All the necessary code, including the manifest template is
in the mingw32compiler.py file:




More information about the Numpy-discussion mailing list