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.
This commit is contained in:
Ray Speth 2012-02-24 03:17:39 +00:00
parent f7a4e3de64
commit 8c23a12152

View file

@ -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;
}