F2PY problems

Siegfried Gonzi siegfried.gonzi at kfunigraz.ac.at
Sun May 5 08:48:24 EDT 2002


Pearu Peterson wrote:

> That said, I looked at the scipy CVS and found that mingw32-support
> needs lib2def but that is part of the weave package. So, as a quick fix,
> get lib2def.py file from the scipy/weave directory and put it into
> the f2py2e/scipy_distutils directory and reinstall f2py. This should solve
> your problem, I hope.

So, this actually works but *only* then when you use something like:

f2py -c foo.f -m foo

Everything else (setup_foo.py, Makefile) is doomed to fail!

The above leads to the next question: I have not really grasped whether
the foomodule.c file is important, because what the case if I want to
compile a Fortran 95 file? I tried it but I get the error message that
gnu does not support F 90 or F95. I saw in the "build_flib.py" file that
the NAG compiler is supported. I thought the NAG compiler is the Fortran
95 compiler from imagine1
(www.fortran.com/fortran/imagine1/compilers.html). But I think I am in
error, because the build_flib.py class doe not find my installed F
compiler (C:/.../F/bin/f.exe).

I would strongly emphasize my wish list that some expert makes also a
support for the F compiler. The F compiler is free for Unix, Linux and
Windows (I think there is even an older F 90 compiler for the Macintosh
available). I am not aware of other ones but the F compiler is the only
free available Fortran 95 compiler. Okay it has one drawback: it is not
backward compatible; you are forced to use *only* F90 or F95 constructs
(e.g.: "integer :: a", instead of "integer a"); but it is possible
(easily) to link to g77 compileable Fortran files and even to gcc
compileable ones.


Regards,
S. Gonzi



More information about the Python-list mailing list