From 32ea4fd924580ad99efe9455d0225a21536ac504 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Fri, 16 Aug 2013 17:25:04 +0000 Subject: [PATCH] [SCons] Fix to skip Python startup messages This fixes an issue when the Python interpreter prints startup messages that appear before the expected output lines. Known to be a problem with the Anaconda Python distribution. --- SConstruct | 2 +- interfaces/cython/SConscript | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index 2c3195b06..105802d30 100644 --- a/SConstruct +++ b/SConstruct @@ -941,7 +941,7 @@ if env['python3_package'] in ('y', 'default'): info = getCommandOutput(env['python3_cmd'], '-c', script) (env['python3_version'], env['python3_usersitepackages'], - cython_version) = info.splitlines() + cython_version) = info.splitlines()[-3:] except OSError: info = False diff --git a/interfaces/cython/SConscript b/interfaces/cython/SConscript index 23e9c8163..d1416e970 100644 --- a/interfaces/cython/SConscript +++ b/interfaces/cython/SConscript @@ -13,7 +13,7 @@ def configure_numpy(python_command): "print(get_python_version())", "print(numpy.get_include())")) info = getCommandOutput(python_command, '-c', script) - module_ext, py_version, numpy_include = info.splitlines() + module_ext, py_version, numpy_include = info.splitlines()[-3:] incDirs = (".", "../../include", numpy_include, localenv['sundials_include'], localenv['boost_inc_dir'])