#42 scons 0.96.1 problem

closed-wont-fix
nobody
5
2004-12-04
2004-10-06
Anonymous
No

On a RedHat 7.2 system, I installed Python 2.2.3, scons
0.96.1, and psyco 1.2.

scons works as long as I don't call 'SConscript()'.
Here are some example files that cause a problem:

-------- SConstruct ------------
import psyco
psyco.full()

env = Environment()

SConscript( 'SConscript', exports='env' )
-------- SConscript ------------
Import('env')

env.Program( 'atest', 'test.c' )

--------------------------------
Now, when I call 'scons' I get:
scons: Reading SConscript files ...
AttributeError: 'NoneType' object has no attribute
'f_globals':
File "SConstruct", line 6:
SConscript( 'SConscript', exports='env' )
File
"/usr/local/lib/scons/SCons/Script/SConscript.py", line
581:
return apply(method, args, kw)
File
"/usr/local/lib/scons/SCons/Script/SConscript.py", line
508:
return apply(_SConscript, [self.fs,] + files,
{'exports' : exports})
File
"/usr/local/lib/scons/SCons/Script/SConscript.py", line
174:
stack.append(Frame(exports,fn))
File
"/usr/local/lib/scons/SCons/Script/SConscript.py", line
140:
self.exports = compute_exports(exports) # exports
from the calling SConscript
File
"/usr/local/lib/scons/SCons/Script/SConscript.py", line
116:
loc, glob = get_calling_namespaces()
File
"/usr/local/lib/scons/SCons/Script/SConscript.py", line
107:
while frame.f_globals.get("__name__") == __name__:
frame = frame.f_back

Discussion

  • Armin Rigo

    Armin Rigo - 2004-10-10

    Logged In: YES
    user_id=4771

    Psyco-faked frame objects have no f_back attributes. This is a known problem described in the user guide. Sorry but it's difficult for me to fix it. You will have to change the source in scons to use sys._getframe(n) with increasing values of n instead of following the f_back chain.

     
  • Armin Rigo

    Armin Rigo - 2004-12-04
    • status: open --> closed-wont-fix
     
  • Armin Rigo

    Armin Rigo - 2004-12-04

    Logged In: YES
    user_id=4771

    Closing the bug report: won't fix. See comments below.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks