[Pythonmac-SIG] Numpy Scipy and Darwinports
David M. Cooke
cookedm at physics.mcmaster.ca
Sun Apr 2 12:15:46 CEST 2006
Robert Kern <robert.kern at gmail.com> writes:
> 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.
I'll have to try that out.
> 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:
Actually, it does: it looks for F77 and F90 environment variables,
along with F77FLAGS, F90FLAGS, FREEFLAGS, and FFLAGS. The code is in
numpy/distutils/fcompiler/__init__.py:FCompiler.customize.
--
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/
|cookedm at physics.mcmaster.ca
More information about the Pythonmac-SIG
mailing list