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

dpo dominique.orban@gmail....
Fri Oct 9 08:56:07 CDT 2009




Pearu Peterson-2 wrote:
> 
> 
> 
> dpo wrote:
>> 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,
>>    )
> 
> Add fortran files to a library and specify the library in the extension:
> 
> config.add_library(name='some_library', sources=['file2.f'])
> config.add_extension(name='some_extension', sources=['file1.c'],
> libraries=['some_library'])
> 
> HTH,
> Pearu
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
> 
> 

OK thanks. That's what I've been doing so far.

D.

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



More information about the SciPy-User mailing list