swig: Fix issue with circular import in 2.0.9/2.0.10
authorAndreas Hansson <andreas.hansson@arm.com>
Wed, 18 Sep 2013 12:46:31 +0000 (08:46 -0400)
committerAndreas Hansson <andreas.hansson@arm.com>
Wed, 18 Sep 2013 12:46:31 +0000 (08:46 -0400)
This patch fixes an issue which prevented gem5 from running when built
using swig 2.0.9 and 2.0.10. The generated event.py tried to import
m5.internal which in turn relied on importing event. This patch seems
to fix the problem, and so far has not caused any other issues.

src/python/m5/__init__.py
src/python/m5/internal/__init__.py

index dc6c5a923bd5572f59b660df9f812070c7932226..9df3f4bfec8bc886331cc3fc7f73fff5eba94015 100644 (file)
@@ -32,7 +32,7 @@
 
 try:
     # Try to import something that's generated by swig
-    import internal
+    import internal.core
 
     # Try to grab something from it in case demandimport is being used
     internal.core.curTick
index 30090549a1f3d6005e3430967cc63d75679e12c8..b795f201fc47a66069d2e929bb0bfa44258fe82d 100644 (file)
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 # Authors: Nathan Binkert
-
-import core
-import debug
-import event
-import stats
-import trace
-from drain import DrainManager, Drainable