import sys try: from distutils.core import setup, Extension except: print 'could not import distutils. Will try anyway...' libs = [] platform = sys.platform flibs = '@FLIBS@' #linkargs = '@LCXX_FLAGS@' 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"], 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"], )