From c233ddcd30eb296b59d5dcab59409d9ebd1311a3 Mon Sep 17 00:00:00 2001 From: "Bryan W. Weber" Date: Sun, 3 Dec 2017 15:23:01 -0500 Subject: [PATCH] If both pythonX_package options are set ignore the python_package option --- SConstruct | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SConstruct b/SConstruct index e37c8ba28..e88ce67f7 100644 --- a/SConstruct +++ b/SConstruct @@ -1112,6 +1112,14 @@ env['python_cmd_esc'] = quoted(env['python_cmd']) cython_min_version = LooseVersion('0.23') numpy_min_test_version = LooseVersion('1.8.1') +# If both python2_package and python3_package are set to something +# other than the default ignore the python_package option +if all([env['python{}_package'.format(p)] != 'default' for p in ['2', '3']]): + if env['python_package'] != 'default': + print("WARNING: Both version-specific pythonX_package options are set. Ignoring " + "non-version specific python_package options") + env['python_package'] = 'none' + if env['python_package'] == 'new': print("WARNING: The 'new' option for the Python package is " "deprecated and will be removed in the future. Use "