From: Nathan Binkert Date: Sun, 16 Aug 2009 20:39:59 +0000 (-0700) Subject: python: Make it possible to import the parts of m5 that are pure python X-Git-Tag: Calvin_Submission~142^2~3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=06c7ecb2079e69ea8d81a01d52ca6266649575f4;p=gem5.git python: Make it possible to import the parts of m5 that are pure python --- 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