From 719fa2ea0b290d8e246bfa27aa42e774815c51a6 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Tue, 10 Apr 2007 23:06:57 +0000 Subject: [PATCH] Reworked a few issues in the python build script so that compilation and link errors would be more self-evident. Now, link errors in the _cantera.so build will register with the python layer, because a python exception is raised. This will propagate into the Makefile causing make to prematurely stop the build process, because one of its commands has come back with a non-zero exit status. This causes the "make all" command to return a non-zero exit status, so that the entire make command comes to a halt, which is the desired behavior. --- Cantera/python/Makefile.in | 1 + Cantera/python/setup.py.in | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cantera/python/Makefile.in b/Cantera/python/Makefile.in index e7382f749..4c9f5d80e 100755 --- a/Cantera/python/Makefile.in +++ b/Cantera/python/Makefile.in @@ -50,6 +50,7 @@ win: _winbuild # _build: $(SRCS) $(LIB_DEPS) Makefile setup.py touch src/pycantera.cpp + /bin/rm -f _build (CXX="@CXX@"; export CXX; CC="@CXX@"; export CC; @PYTHON_CMD@ setup.py build) echo 'ok' > _build diff --git a/Cantera/python/setup.py.in b/Cantera/python/setup.py.in index d1fa9c9f1..80fb6cd11 100644 --- a/Cantera/python/setup.py.in +++ b/Cantera/python/setup.py.in @@ -90,7 +90,10 @@ if buildPython >= 2: ], ) except: - buildPython = 1 + if buildPython == 3: + buildPython = 1 + else: + raise 'Error encountered while building or installing the Cantera python modules!' if buildPython == 1: