I'm new to Cython and I'm trying to compile Cython from this project without success.
With this setup.py,
from distutils.core import setup, Extension
from Cython.Distutils import build_ext
from distutils.extension import Extension
sources_list = ["timgraph.pyx", "Graph.cpp", "InfGraph.cpp", "sfmt/SFMT.c"]
setup(ext_modules=[Extension("pytim",
sources=sources_list,
language="c++",
extra_compile_args=["-std=c++11"])
],
cmdclass={'build_ext':build_ext})
I run the following:
python setup.py build_ext --inplace
and get the following error:
error: invalid argument '-std=c++11' not allowed with 'C/ObjC'
error: command 'clang' failed with exit status 1
I'm running macOS High Sierra 10.13.2, Python 3.6.2, Cython 0.27.3, and Apple LLVM version 9.0.0, in case any of that helps.
EDIT: I thought maybe it's from trying to compile both C and C++ simultaneously, because I can run the Cython example for C++ and it works fine. But I don't know how to get around the fact that the extra_compile_args applies to all of the sources, including "sfmt/SFMT.c".