From 8c23a12152b1d94a61f83495437a1738c61b0131 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Fri, 24 Feb 2012 03:17:39 +0000 Subject: [PATCH] Removed attempt to get PYTHON_CMD from setup_cantera This code didn't work because changes in the environment of the system(...) call aren't propagated back to the caller. --- src/base/ct2ctml.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/base/ct2ctml.cpp b/src/base/ct2ctml.cpp index 0b290669e..e19a59747 100644 --- a/src/base/ct2ctml.cpp +++ b/src/base/ct2ctml.cpp @@ -51,28 +51,12 @@ static string pypath() string s = "python"; const char* py = getenv("PYTHON_CMD"); - // Try to source the "setup_cantera" script from the user's home - // directory in order to set PYTHON_CMD. - if (!py) { - const char* hm = getenv("HOME"); - if (hm) { - string home = stripws(string(hm)); - string cmd = string(". ") + home - +string("/setup_cantera &> /dev/null"); - system(cmd.c_str()); - } - py = getenv("PYTHON_CMD"); - } if (py) { string sp = stripws(string(py)); if (sp.size() > 0) { s = sp; } } - //else { - // throw CanteraError("ct2ctml", - // "set environment variable PYTHON_CMD"); - //} return s; }