summaryrefslogtreecommitdiff
path: root/src/python/m5
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2009-08-16 13:39:59 -0700
committerNathan Binkert <nate@binkert.org>2009-08-16 13:39:59 -0700
commit06c7ecb2079e69ea8d81a01d52ca6266649575f4 (patch)
treec8562347d396218801f28c403db826b02f1fc506 /src/python/m5
parente1270f81bdc81f5a575b34c2d2c294bdde3e6f4f (diff)
downloadgem5-06c7ecb2079e69ea8d81a01d52ca6266649575f4.tar.xz
python: Make it possible to import the parts of m5 that are pure python
Diffstat (limited to 'src/python/m5')
-rw-r--r--src/python/m5/__init__.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/python/m5/__init__.py b/src/python/m5/__init__.py
index 733258acf..c3512cd0d 100644
--- a/src/python/m5/__init__.py
+++ b/src/python/m5/__init__.py
@@ -103,8 +103,11 @@ try:
except ImportError:
internal = None
-import defines
-build_env.update(defines.buildEnv)
+try:
+ import defines
+ build_env.update(defines.buildEnv)
+except ImportError:
+ defines = None
if internal:
defines.compileDate = internal.core.compileDate
@@ -120,4 +123,8 @@ if internal:
import SimObject
import params
-import objects
+
+try:
+ import objects
+except ImportError:
+ objects = None