[SciPy-User] numpy.distutils cross compile question
Mon Oct 29 22:18:55 CDT 2012
I've written a small package in my field containing some pure
python scripts and fortran extension libraries. At first I just use f2py
for the compiling work before importing these extensions into python and
they all worked well. This time, I write a "setup.py" file which import
"setup" function in "numpy.distutils.core" and will build a scipy sub
package on my ubuntu 64 machine, with gfortran specified by the command
"python setup.py build fgnu95", which works well.
My questions comes with the problem when I'd like to build a win
32/64 package. I think it concerns cross compiling, so I installed mingw
compilers like "i686-w64-mingw32-gfortran" and "i686-w64-mingw-32-gcc"
on my ubuntu 12.04. However I don't know how to write the setup.py file
for cross compiling using numpy.distutils. I tried typing "python
setup.py" and specify fortran compiler by typing
"fi686-w64-mingw32-gfortran" for building, however it doesn't work. So
I'm wondering whether I have to build this package on linux 32, 64 bit
and win 32, 64 bit?
Thanks a lot.
More information about the SciPy-User