python,scons: Move grammar.py and code_formatter.py into build_tools.

These are only used in a build, and so don't need to be built into gem5.
grammar.py is used by slicc and the fast model project file parser, and
code_formatter.py is only used by SConscripts.

Change-Id: Id43e62459d69f07fdb2ed125548a83e38bbb7590
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49396
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Gabe Black <gabe.black@gmail.com>
This commit is contained in:
Gabe Black
2021-08-14 06:18:43 -07:00
parent 6cc3b4f6c1
commit cc75a47b84
14 changed files with 12 additions and 13 deletions

View File

@@ -126,6 +126,9 @@ AddOption('--with-systemc-tests', action='store_true',
AddOption('--install-hooks', action='store_true',
help='Install revision control hooks non-interactively')
# Inject the built_tools directory into the python path.
sys.path[1:1] = [ Dir('#build_tools').abspath ]
# Imports of gem5_scons happen here since it depends on some options which are
# declared above.
from gem5_scons import error, warning, summarize_warnings, parse_build_path