diff options
author | Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> | 2018-02-15 00:08:38 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> | 2018-03-06 19:45:34 +0000 |
commit | 5c3983215a2bd27545e8500baddc0567c26783bf (patch) | |
tree | 15de535f4851605e910fc053634a59c3bbc40100 /site_scons/site_init.py | |
parent | 93f57da4c48913552f984ccfe4b1318782a0e64a (diff) | |
download | gem5-5c3983215a2bd27545e8500baddc0567c26783bf.tar.xz |
scons: Import print_function from future
Scons on Fedora 27 imports print_function from the future[1] as a
result of which a gem5 build errors out with a syntax error. Make all
the scons scripts that use the print statement import the print_function
from future and replace the statements with print function calls.
[1] https://github.com/SCons/scons/commit/34cf3bdb1743de9a5534bfd25998d0a01297f004
Change-Id: I67b7ef978fd7567f94d3cd9a904f8a0c1af07ffb
Signed-off-by: Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com>
Reviewed-on: https://gem5-review.googlesource.com/8321
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'site_scons/site_init.py')
-rw-r--r-- | site_scons/site_init.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/site_scons/site_init.py b/site_scons/site_init.py index 6d9d24d30..351f49bc0 100644 --- a/site_scons/site_init.py +++ b/site_scons/site_init.py @@ -38,6 +38,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +from __future__ import print_function from gem5_python_paths import extra_python_paths # Check for recent-enough Python and SCons versions. @@ -49,24 +50,24 @@ try: EnsureSConsVersion(0, 98) EnsureSConsVersion(0, 98, 1) except SystemExit, e: - print """ + print(""" For more details, see: http://gem5.org/Dependencies -""" +""") raise # pybind11 requires python 2.7 try: EnsurePythonVersion(2, 7) except SystemExit, e: - print """ + print (""" You can use a non-default installation of the Python interpreter by rearranging your PATH so that scons finds the non-default 'python' and 'python-config' first. For more details, see: http://gem5.org/wiki/index.php/Using_a_non-default_Python_installation -""" +""") raise sys.path[1:1] = extra_python_paths |