cython + scons + c++

N

Neal Becker

Is there a version of cython.py, pyext.py that will work with c++?

I asked this question some time ago, but never got an answer.

I tried the following code, but it doesn't work correctly. If the commented
lines are uncommented, the gcc command is totally mangled.

Although it did build my 1 test extension OK, I didn't use any libstdc++ - I
suspect it won't link correctly in general because it doesn't seem to treat the
code as c++ (treats it as c code).

cyenv = Environment(PYEXT_USE_DISTUTILS=True)
cyenv.Tool("pyext")
cyenv.Tool("cython")
import numpy

cyenv.Append(PYEXTINCPATH=[numpy.get_include()])
cyenv.Replace(CYTHONFLAGS=['--cplus'])
#cyenv.Replace(CXXFILESUFFIX='.cpp')
#cyenv.Replace(CYTHONCFILESUFFIX='.cpp')
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top