[SciPy-user] Specifying fortran compiler

Robert Kern robert.kern@gmail....
Sun Oct 28 21:23:37 CDT 2007

Adam Mercer wrote:
> On 28/10/2007, Adam Mercer <ramercer@gmail.com> wrote:
>> Is there a way that I can specify which fortran compiler to use?
> I've got a little further with this, if I create a link to
> gfortran-mp-4.2 somewhere in my $PATH called gfortran, then scipy
> finds it and builds without issue.
> It also seems that I can specify which vendor of fortran compiler to use with
> $ python setup.py build --fcompiler=<Vendor>
> but this only seems to work when the fortran compiler uses the
> standard name, is there a way to specify the path to the fortran
> compiler?

[numpy]$ python setup.py config_fc --help
Running from numpy source directory.
Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package

Global options:
  --verbose (-v)  run verbosely (default)
  --quiet (-q)    run quietly (turns verbosity off)
  --dry-run (-n)  don't actually do anything
  --help (-h)     show detailed help message

Options for 'config_fc' command:
  --fcompiler       specify Fortran compiler type
  --f77exec         specify F77 compiler command
  --f90exec         specify F90 compiler command
  --f77flags        specify F77 compiler flags
  --f90flags        specify F90 compiler flags
  --opt             specify optimization flags
  --arch            specify architecture specific optimization flags
  --debug (-g)      compile with debugging information
  --noopt           compile without optimization
  --noarch          compile without arch-dependent optimization
  --help-fcompiler  list available Fortran compilers

usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

Robert Kern

"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 SciPy-user mailing list