How do you tell pyximport to use the cython –cplus option?

One way to make Cython create C++ files is to use a pyxbld file. For example, create foo.pyxbld containing the following:

def make_ext(modname, pyxfilename):
    from distutils.extension import Extension
    return Extension(name=modname,
                     sources=[pyxfilename],
                     language="c++")

Leave a Comment