diff --git a/doc/sphinx/compiling.rst b/doc/sphinx/compiling.rst index 40a60f1c2..6c8389fb2 100644 --- a/doc/sphinx/compiling.rst +++ b/doc/sphinx/compiling.rst @@ -405,8 +405,8 @@ Optional Programs * `Cython `_ * Required to build the new Python module - * Known to work with versions 0.16, 0.17, and 0.18. Expected to work with - versions >= 0.16. + * Known to work with versions 0.17 and 0.18. Expected to work with + versions >= 0.17. * Supports Python 2.7 and 3.2. Expected to work with versions >= 3.2. * `3to2 `_ diff --git a/interfaces/cython/cantera/_cantera.pyx b/interfaces/cython/cantera/_cantera.pyx index 2646af102..7fe4d17ce 100644 --- a/interfaces/cython/cantera/_cantera.pyx +++ b/interfaces/cython/cantera/_cantera.pyx @@ -1,4 +1,5 @@ #cython: embedsignature=True +#distutils: language = c++ import numpy as np cimport numpy as np diff --git a/interfaces/cython/setup.py.in b/interfaces/cython/setup.py.in index 451e9821a..0dd775de8 100644 --- a/interfaces/cython/setup.py.in +++ b/interfaces/cython/setup.py.in @@ -1,16 +1,14 @@ import os -from setuptools import setup, find_packages, Extension -from distutils.sysconfig import get_config_var -from Cython.Distutils import build_ext +from distutils.core import setup +from Cython.Build import cythonize -exts = [Extension("cantera._cantera", - ["cantera/_cantera.pyx"], - include_dirs=@py_include_dirs@, - language="c++", - libraries=@py_cantera_libs@, - library_dirs=@py_libdirs@, - extra_compile_args=@py_extra_compiler_args@, - extra_link_args=@py_extra_link_args@)] +exts = cythonize("cantera/_cantera.pyx") + +exts[0].include_dirs += @py_include_dirs@ +exts[0].extra_compile_args += @py_extra_compiler_args@ +exts[0].libraries += @py_cantera_libs@ +exts[0].library_dirs += @py_libdirs@ +exts[0].extra_link_args += @py_extra_link_args@ setup(name="Cantera", version="@cantera_version@", @@ -20,8 +18,11 @@ setup(name="Cantera", author="Raymond Speth", author_email="speth@mit.edu", url="http://code.google.com/p/cantera", - packages = find_packages(), - cmdclass = {'build_ext': build_ext}, + packages = ['cantera', + 'cantera.data', + 'cantera.test', + 'cantera.test.data', + 'cantera.examples'], ext_modules = exts, package_data = {'cantera.data': ['*.*'], 'cantera.test.data': ['*.*'],