Commit Graph

12 Commits

Author SHA1 Message Date
Bobby R. Bruce
298119e402 misc,python: Run pre-commit run --all-files
Applies the `pyupgrade` hook to all files in the repo.

Change-Id: I9879c634a65c5fcaa9567c63bc5977ff97d5d3bf
2023-10-10 21:47:07 -07:00
Bobby R. Bruce
2bc5a8b71a misc: Run pre-commit run on all files in repo
The following command was run:

```
pre-commit run --all-files
```

This ensures all the files in the repository are formatted to pass our
checks.

Change-Id: Ia2fe3529a50ad925d1076a612d60a4280adc40de
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62572
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-08-24 21:47:07 +00:00
Giacomo Travaglini
d1ba94ac41 util: Remove python3-six package from dockerfiles
python six package is not used in gem5 as we don't support
python2 anymore

Change-Id: I25a682842ad00c0b5e09c9cb4ea6efac5114da6d
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57969
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-03-21 09:38:14 +00:00
Gabe Black
fc75880d25 scons: Update the minimum version of python to 3.6.
The gem5 website says the minimum version of python is 3.6, but SCons
was only enforcing version 3.0.

Change-Id: I50e406538b29d2ee469d5fcc16cd509cfa6a7540
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48513
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-27 15:47:15 +00:00
Gabe Black
e12fc34bd1 scons: Move imports below version checks in site_init.py.
Without knowing for sure we're using python 3, it's dangerous to start
pulling in code which may make that assumption.

Change-Id: Ic13af74a686ee0fb8f36bb672beadea4334b431c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40966
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2021-02-18 23:39:55 +00:00
Hoa Nguyen
257834d23f 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>
2020-10-20 04:45:45 +00:00
Gabe Black
5abb19c89b scons: Set the minimum scons version to 3.0.
Change-Id: Id57a93e819588d2231d2d2d8b28cd62b05fbbe9b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33675
Reviewed-by: Steve Reinhardt <stever@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2020-08-31 01:18:01 +00:00
Bobby R. Bruce
994c72948e misc: Updated old gem5 website URLs with new gem5 website URLs
Jira: https://gem5.atlassian.net/browse/GEM5-272
Change-Id: Ieadb6dd7a44dde4b0be647c91896551822b06a57
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24503
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2020-01-29 16:17:32 +00:00
Gabe Black
a39c8db854 scons: Fixes to improve python 3 support.
Some simple fixes to improve python 3 compatability in scons.

Change-Id: I89aba6ed9d73ee733307c57e033c636029d9cb7a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23264
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2019-12-07 00:03:14 +00:00
Siddhesh Poyarekar
5c3983215a 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] 34cf3bdb17

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>
2018-03-06 19:45:34 +00:00
Gabe Black
91d942a9da scons: Move python path management out of the SConstruct.
Make site_init.py manage sys.path, and the "default" tool set
PYTHONPATH on any environment that's created. The paths to add are
tracked in a common gem5_python_paths.py.

Change-Id: I3387d4394d47a2f9c83322644cfd05909c6890fa
Reviewed-on: https://gem5-review.googlesource.com/5564
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
2017-11-10 13:17:15 +00:00
Gabe Black
b67ea8fb3a scons: Move scons and python version checking into site_init.py.
In an effort to shrink and modularize the main scons files, this
change pulls the scons and python version checking code out of the
main file and into site_init.py which runs before the SConstruct
starts. This will be a place to put really generic code which has to
do with the very fundemental aspects of getting scons to work. Other
checks, like checks for particular tools or particular versions of
tools, will happen in other more specialized files.

Change-Id: Icd00ecadbe1141aef4dbadcf42d6ddef1f3a701f
Reviewed-on: https://gem5-review.googlesource.com/5561
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
2017-11-10 13:12:58 +00:00