[Numpy-discussion] f2py produces so.so

Berthold Höllmann bhoel at despammed.com
Mon Jun 19 14:00:18 CDT 2006

"George Nurser" <gnurser at googlemail.com> writes:

> I have run into a strange problem with the current numpy/f2py (f2py
> 2_2631, numpy 2631).
> I have a file [Wright.f] which contains 5 different fortran
> subroutines. Arguments have been specified as input or output by
> adding cf2py    intent (in), (out) etc.
> Doing
> f2py -c Wright.f -m Wright.so

simply try 

f2py -c Wright.f -m Wright

instead. Python extension modules require the an exported routine
named init<module name> (initWright in this case). But you told f2py
to generate an extension module named "so" in a package named
"Wright", so the generated function is named initso. The *.so file
cannot be renamed because then there is no more matching init function

berthold at xn--hllmanns-n4a.de / <http://höllmanns.de/>
bhoel at web.de                 / <http://starship.python.net/crew/bhoel/>

More information about the Numpy-discussion mailing list