[SciPy-dev] Combining Numpy/C/fortran ?
Fri Mar 9 17:41:42 CST 2007
If you find difficulty in getting setup.py to do what you want, then try
SCons (http://www.scons.org). It is python based, and supports linking
fortran, SWIG, C, C++, (and lots of other types of code) very naturally.
If you want to provide python access directly to a fortran function, the
approach with SWIG would be to write a *C header file* that described
the fortran function, then embed the header file in your SWIG .i file.
Then something like the following should just work:
This might be possible with setup.py; I'm not sure.
Pierre GM wrote:
> On Friday 09 March 2007 06:44:43 John Pye wrote:
>> Maybe this is what you're looking for?
> Almost. I guess that should do the trick as long as I stay on the C side.
> However, how should I write the setup.py so that the required fortran files
> are compiled properly ? I haven't been able to find any example...
> And as I'm mixing C and fortran, I have to declare the arrays with
> an "order='F'", right ?
> Scipy-dev mailing list
More information about the Scipy-dev