[Cython] The newbie's question about wrapping c++ class with pyrex
Stefan Behnel
stefan_ml at behnel.de
Fri Apr 18 07:41:21 CEST 2008
Hi,
Robert Bradshaw wrote:
> I'd like to add this example to the automated testing infrastructure,
> but it seems unclear how to do so with the current runtests.py.
Hmm, sure it's a C++ example, so Cython/distutils will have to know that in
advance.
I think that's the same problem as Py2/Py3 source code. It's actually a
different language that you want to target with your source (as a backend like
C/C++ or as a frontend like Py2/3), but there is no way to say so from within
your source file.
But at least for the test suite, we could add a comment like "#c++" in the
first line, read the first few bytes of each test file and configure the
distutils Extension language option accordingly.
Stefan
More information about the Cython-dev
mailing list