Remove HAS_NO_PYTHON configuration variable

This variable is not needed since in the two places its used we do a
runtime check of the presence of the Python interface anyways
This commit is contained in:
Bryan W. Weber
2017-11-07 11:34:15 -05:00
committed by Ray Speth
parent 684262e945
commit 16fd18315c
5 changed files with 0 additions and 32 deletions

View File

@@ -1436,11 +1436,6 @@ configh['SOLARIS'] = 1 if env['OS'] == 'Solaris' else None
configh['DARWIN'] = 1 if env['OS'] == 'Darwin' else None
cdefine('NEEDS_GENERIC_TEMPL_STATIC_DECL', 'OS', 'Solaris')
if env['python_package'] == 'none' and env['python3_package'] == 'n':
configh['HAS_NO_PYTHON'] = 1
else:
configh['HAS_NO_PYTHON'] = None
configh['SUNDIALS_VERSION'] = env['sundials_version'].replace('.','')
if env.get('has_sundials_lapack') and env['use_lapack']:

View File

@@ -70,12 +70,6 @@ typedef int ftnlen; // Fortran hidden string length type
// and this leads to multiple defines at link time
%(NEEDS_GENERIC_TEMPL_STATIC_DECL)s
//--------------------- Python ------------------------------------
// If this is defined, then python will not be assumed to be
// present to support conversions
%(HAS_NO_PYTHON)s
//-------------- Optional Cantera Capabilities ----------------------
// Enable Sundials to use an external BLAS/LAPACK library if it was

View File

@@ -89,14 +89,6 @@ static std::string call_ctml_writer(const std::string& text, bool isfile)
arg = "text=r'''" + text + "'''";
}
#ifdef HAS_NO_PYTHON
//! Section to bomb out if python is not present in the computation
//! environment.
throw CanteraError("ct2ctml",
"python cti to ctml conversion requested for file, " + file +
", but not available in this computational environment");
#endif
string python_output, error_output;
int python_exit_code;
try {
@@ -191,15 +183,6 @@ std::string ct_string2ctml_string(const std::string& cti)
void ck2cti(const std::string& in_file, const std::string& thermo_file,
const std::string& transport_file, const std::string& id_tag)
{
#ifdef HAS_NO_PYTHON
//! Section to bomb out if python is not present in the computation
//! environment.
string ppath = in_file;
throw CanteraError("ct2ctml",
"python ck to cti conversion requested for file, " + ppath +
", but not available in this computational environment");
#endif
string python_output;
int python_exit_code;
try {

View File

@@ -8,7 +8,6 @@
namespace Cantera
{
#ifndef HAS_NO_PYTHON
TEST(FracCoeff, ConvertFracCoeff)
{
IdealGasPhase thermo1("../data/frac.cti", "gas");
@@ -33,7 +32,6 @@ TEST(FracCoeff, ConvertFracCoeff)
}
}
}
#endif
class FracCoeffTest : public testing::Test
{

View File

@@ -155,7 +155,6 @@ TEST(IonsFromNeutralConstructor, fromScratch)
EXPECT_NEAR(mu[1], -2.88157298e+06, 1e-1);
}
#ifndef HAS_NO_PYTHON // skip these tests if the Python converter is unavailable
class CtiConversionTest : public testing::Test
{
public:
@@ -215,7 +214,6 @@ TEST_F(ChemkinConversionTest, FailedConversion) {
ASSERT_THROW(ck2cti("h2o2_missingThermo.inp"),
CanteraError);
}
#endif
class ConstructFromScratch : public testing::Test
{