[Cython] setup.py no longer makes use of setuptools / distribute
This makes it easier to install the Python package into non-standard locations. Requires the 'cythonize' function introduced in Cython 0.17.
This commit is contained in:
parent
3cc0aa1689
commit
372d20ce6e
3 changed files with 17 additions and 15 deletions
|
|
@ -405,8 +405,8 @@ Optional Programs
|
|||
* `Cython <http://cython.org/>`_
|
||||
|
||||
* 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 <http://pypi.python.org/pypi/3to2>`_
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#cython: embedsignature=True
|
||||
#distutils: language = c++
|
||||
|
||||
import numpy as np
|
||||
cimport numpy as np
|
||||
|
|
|
|||
|
|
@ -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': ['*.*'],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue