scons,python: Add warning for when python3-config is not used
authorBobby R. Bruce <bbruce@ucdavis.edu>
Mon, 28 Sep 2020 18:56:19 +0000 (11:56 -0700)
committerBobby R. Bruce <bbruce@ucdavis.edu>
Tue, 29 Sep 2020 17:52:15 +0000 (17:52 +0000)
We cannot say for certain whether 'python-config' is python2 or python3,
but this patch will produce a warning if 'python3-config' is not used,
stating that support for python2 will be dropped in future releases of
gem5.

Change-Id: I114da359c8768071bf7dd7f2701aae85e3459678
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35256
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
SConstruct

index 667a0e6478f97f0b9286d2422a515f8cb5527b3f..621f923cdb36d7ff64a41ffd05bc97fbc8214b5b 100755 (executable)
@@ -637,6 +637,10 @@ if main['USE_PYTHON']:
               main['PYTHON_CONFIG'])
 
     print("Info: Using Python config: %s" % (python_config, ))
+    if python_config != 'python3-config':
+        warning('python3-config could not be found.\n'
+                'Future releases of gem5 will drop support for python2.')
+
     py_includes = readCommand([python_config, '--includes'],
                               exception='').split()
     py_includes = list(filter(