Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/49415 )
(
30 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
)Change subject: python: Insert gem5's m5 importer at the front of
sys.meta_path.
......................................................................
python: Insert gem5's m5 importer at the front of sys.meta_path.
This is equivalent to putting a path first in $PATH, ie it will make
sure that m5.foo resolves to gem5's internal m5 package, and not
whatever directory named m5 happens to be nearby.
Change-Id: I762d47da8ed8e4cfdf03e412d7dd7cc91a691b58
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49415
Reviewed-by: Gabe Black <[email protected]>
Maintainer: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/python/importer.py
1 file changed, 18 insertions(+), 1 deletion(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/python/importer.py b/src/python/importer.py
index baeae21..94edb91 100644
--- a/src/python/importer.py
+++ b/src/python/importer.py
@@ -77,4 +77,4 @@
import sys
importer = CodeImporter()
add_module = importer.add_module
-sys.meta_path.append(importer)
+sys.meta_path.insert(0, importer)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/49415
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I762d47da8ed8e4cfdf03e412d7dd7cc91a691b58
Gerrit-Change-Number: 49415
Gerrit-PatchSet: 33
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s