changeset c77e698abe9c in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=c77e698abe9c
description:
        scons: deal with generated .py files properly

diffstat:

1 file changed, 7 insertions(+), 7 deletions(-)
src/SConscript |   14 +++++++-------

diffs (44 lines):

diff -r a5322e816a2a -r c77e698abe9c src/SConscript
--- a/src/SConscript    Sun Nov 08 15:49:03 2009 -0800
+++ b/src/SConscript    Sun Nov 08 17:35:49 2009 -0800
@@ -132,15 +132,15 @@
         modpath = '.'.join(modpath)
 
         arcpath = path + [ self.basename ]
-        debugname = self.snode.abspath
-        if not exists(debugname):
-            debugname = self.tnode.abspath
+        abspath = self.snode.abspath
+        if not exists(abspath):
+            abspath = self.tnode.abspath
 
         self.package = package
         self.modname = modname
         self.modpath = modpath
         self.arcname = joinpath(*arcpath)
-        self.debugname = debugname
+        self.abspath = abspath
         self.compiled = File(self.filename + 'c')
         self.assembly = File(self.filename + '.s')
         self.symname = "PyEMB_" + PySource.invalid_sym_char.sub('_', modpath)
@@ -339,9 +339,9 @@
         source = self.modules[fullname]
         if source.modname == '__init__':
             mod.__path__ = source.modpath
-        mod.__file__ = source.snode.abspath
+        mod.__file__ = source.abspath
 
-        exec file(source.snode.abspath, 'r') in mod.__dict__
+        exec file(source.abspath, 'r') in mod.__dict__
 
         return mod
 
@@ -892,7 +892,7 @@
     dst = file(str(target[0]), 'w')
 
     pysource = PySource.tnodes[source[0]]
-    compiled = compile(src, pysource.debugname, 'exec')
+    compiled = compile(src, pysource.abspath, 'exec')
     marshalled = marshal.dumps(compiled)
     compressed = zlib.compress(marshalled)
     data = compressed
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to