diff --git a/Cantera/python/Makefile.in b/Cantera/python/Makefile.in index ff6fc1535..e7382f749 100755 --- a/Cantera/python/Makefile.in +++ b/Cantera/python/Makefile.in @@ -43,9 +43,14 @@ all: _build win: _winbuild -_build: $(SRCS) $(LIB_DEPS) Makefile +# +# HKM -> Python seems to want to compile C++ code with the CC compiler. +# The fix is to assign the CC compiler to the CXX compiler. +# the double quotes are needed if the CXX variable is multi-token. +# +_build: $(SRCS) $(LIB_DEPS) Makefile setup.py touch src/pycantera.cpp - (CXX="@CXX@"; export CXX; CC="@CC@"; export CC; @PYTHON_CMD@ setup.py build) + (CXX="@CXX@"; export CXX; CC="@CXX@"; export CC; @PYTHON_CMD@ setup.py build) echo 'ok' > _build # diff --git a/Cantera/python/ctml_writer.py b/Cantera/python/ctml_writer.py index 69a05334c..ef38bffe9 100644 --- a/Cantera/python/ctml_writer.py +++ b/Cantera/python/ctml_writer.py @@ -1,3 +1,4 @@ +#!/usr/local/bin/python """ Cantera .cti input file processor diff --git a/Cantera/python/setup.py.in b/Cantera/python/setup.py.in index f7adba2fb..16a01ee6e 100644 --- a/Cantera/python/setup.py.in +++ b/Cantera/python/setup.py.in @@ -36,14 +36,23 @@ libdir = ['@buildlib@'] for d in dirlist: libdir.append(d) +endlibstr1 = "@LCXX_END_LIBS@" +endlib1 = endlibstr1.replace('-l', ' ') +endlib = endlib1.split() + if platform == "win32": libs = ["clib", "zeroD","oneD","transport", "cantera","recipes"] + bllist + cvlist + ["ctmath", "tpx", "converters"] else: libs = ["clib", "zeroD","oneD","transport", - "cantera", "converters"] + bllist + cvlist + ["ctmath", "tpx", - "stdc++", "ctf2c", "m"] + "cantera", "converters"] + bllist + cvlist + ["ctmath", "tpx"] + + if @build_with_f2c@ == 1: + libs.append("ctf2c") + for d in endlib: + libs.append(d) + # values: # 0 do nothing