scons: Raise an exception when scons is run a Python2 environment
authorHoa Nguyen <hoanguyen@ucdavis.edu>
Thu, 15 Oct 2020 21:08:41 +0000 (14:08 -0700)
committerHoa Nguyen <hoanguyen@ucdavis.edu>
Tue, 20 Oct 2020 04:45:45 +0000 (04:45 +0000)
commit257834d23f8b061e3687ab77ca785d6c556e8277
tree91e9aad71e5c84cbca8eb5094e899c3adf8bb71a
parent2f3f146034fd4f838e8a625cf652968ed437a15d
scons: Raise an exception when scons is run a Python2 environment

As gem5 has started to use Python2 incompatible features, compiling
gem5 in a Python2 environment results in an error.

This commit addresses this issue by raising an Exception when scons
is run in a Python2 environment, and adding a few pointers on how to
install Python3 and on how to use scons in a Python3 environment. The
solution works in a system where both Python2 and Python3 are
installed.

JIRA: https://gem5.atlassian.net/browse/GEM5-797

Change-Id: I98d4a39f586f39d9253ab2517b77e86c5ed19466
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/36157
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
site_scons/site_init.py