[Numpy-discussion] distutils for a Pyrex module

Pierre GM pgmdevlist@gmail....
Tue Mar 20 17:06:03 CDT 2007

On Tuesday 20 March 2007 17:46:28 Robert Kern wrote:

> The first file in the sources list should be the one that actually
> implements the module, i.e. the C file generated by Pyrex. FORTRAN files
> specified after the first one won't be processed by f2py.

Mmh. I had to get rid of the '*.pyx' and '*.pxd' lines as numpy.distutils 
complained of a multiple definition of initcloess.
However, that still doesn't work: I switched the order of f_sources and 
c_sources to
>>>sources=[join('src', x) for x in (c_sources+f_sources)],
where c_sources now have 'cloess.c' as first element (that's the output of 
pyrex), and f2py still processes the fortran sources. At the end, the module 
contains only the f2py-processed fortran subroutines, which are useless on 
their own.
I'm obviously missing something. Any other idea ?

Thanks a lot in advance

More information about the Numpy-discussion mailing list