37 lines
1.1 KiB
Python
37 lines
1.1 KiB
Python
import os
|
|
from distutils.core import setup, Extension
|
|
from distutils.sysconfig import get_config_var
|
|
from Cython.Distutils import build_ext
|
|
|
|
dataFiles = ['_cantera%s' % get_config_var('SO')]
|
|
if os.name == 'nt':
|
|
dataFiles.append('cantera_shared.dll')
|
|
else:
|
|
dataFiles.append('libcantera_shared.so')
|
|
|
|
exts = []
|
|
|
|
def addExtension(name):
|
|
exts.append(Extension("cantera.%s" % name,
|
|
["cantera/%s.pyx" % name],
|
|
include_dirs=@py_include_dirs@,
|
|
language="c++",
|
|
libraries=@py_cantera_libs@,
|
|
library_dirs=@py_libdirs@,
|
|
extra_link_args=@py_extra_link_args@))
|
|
|
|
addExtension('solution')
|
|
addExtension('utils')
|
|
|
|
setup(name="Cantera",
|
|
version="@cantera_version@",
|
|
description="The Cantera Python Interface",
|
|
long_description="""
|
|
""",
|
|
author="Raymond Speth",
|
|
author_email="speth@mit.edu",
|
|
url="http://code.google.com/p/cantera",
|
|
packages = ["cantera"],
|
|
cmdclass = {'build_ext': build_ext},
|
|
ext_modules = exts,
|
|
package_data = {'cantera': dataFiles})
|