[Pythonmac-SIG] Numpy Scipy and Darwinports
Robert Kern
robert.kern at gmail.com
Fri Mar 31 23:06:33 CEST 2006
David M. Cooke wrote:
> Jaonary Rabarisoa <jaonary at free.fr> writes:
>
>
>>Hi all,
>>I'd like to build numpy and scipy with the gcc 4.1 provided by
>>darwinport (I fact, they need a fortran compiler). How can I do to
>>change the compiler to be used with distutils ? I've tried something
>>like this :
>>
>>python setup.py build --compiler=gcc-dp-4.1 ( all the file installed
>>with darwinports have the suffix -dp-4.1)
>>
>>but I didn't work.
>
> Use the CC environment variable:
>
> CC=gcc-dp-4.1 python setup.py build
>
> However, note that gfortran will *not* work with scipy: we don't know
> why, but we believe to be something to do with gfortran not being
> stable yet. I tested it recently; still no go.
IIRC, someone found that gfortran 4.1 will work if d1mach.f is compiled with
only -O, not -O2. Possibly -ffloat-store, too, I don't remember.
In any case, numpy.distutils doesn't let you set the name of the fortran
compiler through an environment variable, I don't think. I recommend making a
symlink named "gfortran" to the actual executable. Then:
CC=gcc-dp-4.1 python setup.py config_fc --fcompiler=gnu95 build_src build_clib
build_ext build
--
Robert Kern
robert.kern at gmail.com
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Pythonmac-SIG
mailing list