[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.
This commit is contained in:
Ray Speth
2013-08-16 17:25:04 +00:00
parent d60629ead5
commit 32ea4fd924
2 changed files with 2 additions and 2 deletions

View File

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

View File

@@ -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'])