[SciPy-User] [SciPy-user] Prevent f2py in add_extension()

dpo dominique.orban@gmail....
Thu Oct 8 15:27:35 CDT 2009


Hello,

My setup.py scripts use numpy distutils. I notice that whenever the list of
source files specified in config.add_extension() contains Fortran files,
f2py kicks in and tries to build a wrapper around the Fortran files. How can
I prevent this behavior? I have a pre-written extension module in C which
relies on a Fortran file, i.e. :

src_files = ['file1.c', 'file2.f']  # file1.c is already a wrapper; I don't
want file2.f wrapped by f2py

config.add_extension(
   name = 'some_extension',
   sources = src_files,
   )

I've tried adding f2py_options=['--no-wrap-functions'] to the argument list,
but that doesn't seem to do the trick. The only way I've found so far is to
create libraries with all the Fortran files, but that's a bit artificial.

Any ideas?

Thanks in advance.
-- 
View this message in context: http://www.nabble.com/Prevent-f2py-in-add_extension%28%29-tp25809074p25809074.html
Sent from the Scipy-User mailing list archive at Nabble.com.



More information about the SciPy-User mailing list