mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
50 lines
1.5 KiB
Python
50 lines
1.5 KiB
Python
#!/usr/bin/python2
|
|
import sys
|
|
try:
|
|
from distutils.core import setup, Extension
|
|
except:
|
|
print 'could not import distutils. Skipping Python interface.'
|
|
sys.exit(0)
|
|
|
|
libs = []
|
|
platform = sys.platform
|
|
|
|
if platform == "win32":
|
|
libs = ["cantera14"]
|
|
else:
|
|
libs = ["clib", "zeroD","oneD","transport",
|
|
"cantera","recipes","ctlapack",
|
|
"ctblas", "ctmath", "cvode", "tpx", "stdc++", "g2c", "m"]
|
|
|
|
|
|
#if sys.argv[1] == 'install':
|
|
# import time
|
|
# f = open('_pydate.py','w')
|
|
# f.write('date = '+`time.time()`)
|
|
# f.close()
|
|
|
|
#try:
|
|
setup(name="Cantera",
|
|
version="1.5",
|
|
description="The Cantera Python Interface",
|
|
long_description="""
|
|
""",
|
|
author="Prof. D. G. Goodwin, Caltech",
|
|
author_email="dgoodwin@caltech.edu",
|
|
url="http://www.cantera.org",
|
|
package_dir = {'MixMaster':'../../apps/MixMaster'},
|
|
packages = ["","Cantera","Cantera.OneD",
|
|
"MixMaster","MixMaster.Units"],
|
|
ext_modules=[
|
|
Extension("Cantera._cantera",
|
|
["src/pycantera.cpp", "src/writelog.cpp"],
|
|
include_dirs=["../../build/include",
|
|
"src", "../clib/src"],
|
|
library_dirs = ["@buildlib@"], libraries = libs)
|
|
],
|
|
)
|
|
#except:
|
|
# print '***************************************'
|
|
# print ' Error: setup.py failed'
|
|
|