mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
71 lines
2.3 KiB
Python
71 lines
2.3 KiB
Python
import sys
|
|
try:
|
|
from distutils.core import setup, Extension
|
|
except:
|
|
print 'could not import distutils. Will try anyway...'
|
|
|
|
libs = []
|
|
platform = sys.platform
|
|
|
|
flibs = '@FLIBS@'
|
|
|
|
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)
|
|
|
|
if platform == "win32":
|
|
libs = ["clib", "zeroD","oneD","transport",
|
|
"cantera","recipes"] + bllist + ["ctmath", "cvode", "tpx"]
|
|
else:
|
|
|
|
# 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.
|
|
|
|
libs = ["clib", "zeroD","oneD","transport",
|
|
"cantera","recipes"] + bllist + ["ctmath", "cvode", "tpx",
|
|
"stdc++", "g2c", "m"]
|
|
|
|
|
|
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"],
|
|
library_dirs = libdir,
|
|
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"],
|
|
)
|