[Cython] History of SWIG and applicability to Cython

Chris Colbert sccolbert at gmail.com
Mon Aug 29 22:55:49 CEST 2011


I've been working on CWrap in my spare time.

https://github.com/enthought/cwrap

The goal is to be SWIG for Cython.

It currently outputs pxd files for the headers of a C library. It's not
mature, but it works. (It can output pxd files for the whole of Intel's IPP
and MKL libraries). I hope to eventually output pyx implementation files as
well.

It currently uses gccxml, but I hope to make the switch to Clang.

We've been talking amongst ourselves @ enthought to lobby you guys
eventually to merge it with Cython main, but I just haven't had the
bandwidth to get it up to that point.

Chris


On Mon, Aug 29, 2011 at 3:42 PM, David Cournapeau <cournape at gmail.com>wrote:

> On Mon, Aug 29, 2011 at 10:31 PM, mark florisson
> <markflorisson88 at gmail.com> wrote:
> > On 29 August 2011 19:25, Stefan Behnel <stefan_ml at behnel.de> wrote:
> >> Stefan Behnel, 29.08.2011 16:33:
> >>>
> >>> here's an interesting history wrap-up of SWIG, by its original author.
> >>> [...]
> >>
> >> And an interesting reply:
> >>
> >> http://thread.gmane.org/gmane.comp.python.devel/126425/focus=126440
> >>
> >> I didn't know clang even had Python bindings for its parser.
> >>
> >> Stefan
> >> _______________________________________________
> >> cython-devel mailing list
> >> cython-devel at python.org
> >> http://mail.python.org/mailman/listinfo/cython-devel
> >>
> >
> > Last time I checked I think they didn't support the preprocessor yet,
> > and I do think you want access to macros. Macro constants are easy if
> > you have access to the preprocessor, I don't know about macro
> > functions... perhaps those should remain the user's burden. I would
> > certainly welcome a good pxd generator.
> >
> > There is one such generator out there, can't seem to find it right
> > now.
>
> I did one such thing, but it is more of an hack than a real solution:
>
> https://github.com/cournape/cython-codegen
>
> Using gccxml is a PITA:
>  - you cannot force C mode (always assume C++)
>  - building gccxml is not pleasant
>
> clang is much better for this kind of things,
>
> cheers,
>
> David
> _______________________________________________
> cython-devel mailing list
> cython-devel at python.org
> http://mail.python.org/mailman/listinfo/cython-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cython-devel/attachments/20110829/189fa7a4/attachment-0001.html>


More information about the cython-devel mailing list