On Thu, Mar 25, 2010 at 12:52 AM, Dag Sverre Seljebotn
<[email protected]> wrote:
[snip]

>>
>> That should be enough. I use cmake, so I'd appreciate if fwrap could
>> just spit the C (or fortran or both) files, that I compile and link
>> myself. Just like Cython does. (I read some issues with integrating
>
> Note that fwrap generates both C, Fortran and Cython code to make
> everything work together in a standard-compliant way...
>
> Also, unless things have changed, a configuration script must be run as
> part of the build process to detect which C types correspond to which
> Fortran types. f2py just makes blatant assumptions in this area and you
> could probably impose such blatant assumptions yourself too if you want
> to avoid complicating your build.

I'm shaking out these details as time goes on -- I'm settling on a few
solutions for different use scenarios (not all are implemented,
though).

1) David Cournapeau indicated that generating, compiling and running a
fortran 'genconfig' program is a problem for using fwrap with scipy --
I believe because of windows restrictions.  This is the easiest way to
get the config modules/headers/pxd's generated without an fwrap
dependency.

2) Allow the user to specify the mapping between each fortran
kind-type-parameter and C type, with a dictionary in a specification
file.  This is brain-dead simple to get working -- not as
user-friendly, though.  May lead to hard-to-debug runtime segfaults if
the mappings are specified incorrectly.

3) Let fwrap do it all -- but this requires fwrap to do the
compilation step.  Safer & friendlier, but introduces a compile-time
dependency.

>
> (If you are building Cython code via cmake in a reasonably robust manner
> we would love to have the necesarry scripts contributed to the our
> Tools/ dir. Have you just hardcoded the C compilation flags or do you
> try to be portable and query distutils.sysconfig?)
>
> Dag Sverre
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to