Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/49409 )
Change subject: python: Remove the ability to have gem5 look for python in
the tree.
......................................................................
python: Remove the ability to have gem5 look for python in the tree.
It's likely noone even knows this feature exists, and using it would be
very dangerous since the gem5 binary should match the python source in
order to work correctly.
Change-Id: Iabe08d92211f8224a9b206e78d892285dc7de32f
---
M src/python/importer.py
1 file changed, 0 insertions(+), 6 deletions(-)
diff --git a/src/python/importer.py b/src/python/importer.py
index 76c0fa5..7a2c8ff 100644
--- a/src/python/importer.py
+++ b/src/python/importer.py
@@ -41,8 +41,6 @@
class CodeImporter(object):
def __init__(self):
self.modules = {}
- override_var = os.environ.get('M5_OVERRIDE_PY_SOURCE', 'false')
- self.override = (override_var.lower() in ('true', 'yes'))
def add_module(self, abspath, modpath, code):
if modpath in self.modules:
@@ -56,10 +54,6 @@
abspath, code = self.modules[fullname]
- if self.override and os.path.exists(abspath):
- src = open(abspath, 'r').read()
- code = compile(src, abspath, 'exec')
-
is_package = (os.path.basename(abspath) == '__init__.py')
spec = importlib.util.spec_from_loader(
name=fullname, loader=ByteCodeLoader(code),
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/49409
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: Iabe08d92211f8224a9b206e78d892285dc7de32f
Gerrit-Change-Number: 49409
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s