python,scons: Move readCommand and compareVersions into site_scons.
These functions are only used by scons, so it makes sense to move them to site_scons/gem5_scons/util.py. Change-Id: If2b3995f208cb71adf3c59aac4eabe378c47f94f Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41599 Reviewed-by: Gabe Black <gabe.black@gmail.com> Maintainer: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -42,7 +42,6 @@ import os
|
||||
import sys
|
||||
|
||||
import gem5_scons.util
|
||||
from m5.util import readCommand
|
||||
|
||||
git_style_message = """
|
||||
You're missing the gem5 style or commit message hook. These hooks help
|
||||
@@ -52,7 +51,7 @@ Press enter to continue, or ctrl-c to abort: """
|
||||
|
||||
def install_style_hooks(env):
|
||||
try:
|
||||
gitdir = env.Dir(readCommand(
|
||||
gitdir = env.Dir(gem5_scons.util.readCommand(
|
||||
["git", "rev-parse", "--git-dir"]).strip("\n"))
|
||||
except Exception as e:
|
||||
print("Warning: Failed to find git repo directory: %s" % e)
|
||||
|
||||
Reference in New Issue
Block a user