2003-04-14 17:57:48 +00:00
|
|
|
import sys
|
2003-04-20 13:18:09 +00:00
|
|
|
try:
|
|
|
|
|
from distutils.core import setup, Extension
|
|
|
|
|
except:
|
2004-06-02 04:39:09 +00:00
|
|
|
print 'could not import distutils. Will try anyway...'
|
2003-04-20 13:18:09 +00:00
|
|
|
|
|
|
|
|
libs = []
|
2003-04-14 17:57:48 +00:00
|
|
|
platform = sys.platform
|
|
|
|
|
|
2004-08-03 10:25:03 +00:00
|
|
|
flibs = '@FLIBS@'
|
|
|
|
|
|
2004-07-14 11:24:12 +00:00
|
|
|
bllibstr = "@BLAS_LAPACK_LIBS@"
|
|
|
|
|
bllibs = bllibstr.replace('-l',' ')
|
|
|
|
|
bllist = bllibs.split()
|
|
|
|
|
|
|
|
|
|
bldirstr = "@LOCAL_LIB_DIRS@"
|
|
|
|
|
bldirs = bldirstr.replace('-L',' ')
|
|
|
|
|
dirlist = bldirs.split()
|
|
|
|
|
libdir = ['@buildlib@']
|
|
|
|
|
for d in dirlist:
|
|
|
|
|
libdir.append(d)
|
|
|
|
|
|
2003-04-14 17:57:48 +00:00
|
|
|
if platform == "win32":
|
2004-01-04 15:49:22 +00:00
|
|
|
libs = ["clib", "zeroD","oneD","transport",
|
2004-07-14 11:24:12 +00:00
|
|
|
"cantera","recipes"] + bllist + ["ctmath", "cvode", "tpx"]
|
2003-04-14 17:57:48 +00:00
|
|
|
else:
|
2004-01-04 21:34:11 +00:00
|
|
|
|
|
|
|
|
# The library 'g2c' is needed if the g77 Fortran compiler is
|
|
|
|
|
# used to compile the Fortran-77 procedures in libraries
|
|
|
|
|
# 'recipes', 'ctlapack', 'ctblas', and 'ctmath'. If a different
|
|
|
|
|
# compiler is used, add the appropriate libraries here.
|
|
|
|
|
|
2003-12-12 16:15:17 +00:00
|
|
|
libs = ["clib", "zeroD","oneD","transport",
|
2004-07-14 11:24:12 +00:00
|
|
|
"cantera","recipes"] + bllist + ["ctmath", "cvode", "tpx",
|
|
|
|
|
"stdc++", "g2c", "m"]
|
|
|
|
|
|
2003-04-14 17:57:48 +00:00
|
|
|
|
2004-06-02 04:39:09 +00:00
|
|
|
if @BUILD_PYTHON@ == 2:
|
|
|
|
|
|
|
|
|
|
setup(name="Cantera",
|
|
|
|
|
version="@ctversion@",
|
|
|
|
|
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"],
|
2004-07-14 11:24:12 +00:00
|
|
|
library_dirs = libdir,
|
2004-06-02 04:39:09 +00:00
|
|
|
libraries = libs)
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
|
|
setup(name="Cantera CTI File Processor",
|
|
|
|
|
version="@ctversion@",
|
|
|
|
|
description="Converts .cti files to CTML",
|
|
|
|
|
long_description="""
|
|
|
|
|
""",
|
|
|
|
|
author="Prof. D. G. Goodwin, Caltech",
|
|
|
|
|
author_email="dgoodwin@caltech.edu",
|
|
|
|
|
url="http://www.cantera.org",
|
|
|
|
|
py_modules = ["ctml_writer"],
|
|
|
|
|
)
|