Searched hist:9585 (Results 1 - 1 of 1) sorted by relevance

/gem5/
H A DSConstructdiff 9585:ef864175dcc0 Thu Mar 14 11:08:00 EDT 2013 Andreas Sandberg <andreas@sandberg.pp.se> scons: Check for known buggy version of SWIG (2.0.9)

SWIG version 2.0.9 uses fully qualified module names despite of the
importing module being in the same package as the imported
module. This has the unfortunate consequence of causing the following
error when importing m5.internal.event:

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "src/python/importer.py", line 75, in load_module
exec code in mod.__dict__
File "src/python/m5/__init__.py", line 35, in <module>
import internal
File "src/python/importer.py", line 75, in load_module
exec code in mod.__dict__
File "src/python/m5/internal/__init__.py", line 32, in <module>
import event
File "src/python/importer.py", line 75, in load_module
exec code in mod.__dict__
File "build/X86/python/swig/event.py", line 107, in <module>
class Event(m5.internal.serialize.Serializable):
AttributeError: 'module' object has no attribute 'internal'

When 'event' is loaded, it triggers 'serialize' to be loaded. However,
it seems like the dictionary of 'm5' isn't updated until after
__init__.py terminates, which means that 'event' never sees the
'internal' attribute on 'm5'. Older versions of SWIG didn't include
the fully qualified module name if the modules were in the same
package.

Completed in 58 milliseconds