pypy/bin/py.py does not work with cpy object space
[llcoolj] bin > ./py.py -o cpy
[cbuild:execute] cc -O2 -pthread -I/usr/include/python2.4 -c
ctypesplatcheck_0.c -o ctypesplatcheck_0.o
[cbuild:execute] cc -pthread /tmp/usession-23/ctypesplatcheck_0.o -lm
-lpthread -o /tmp/usession-23/ctypesplatcheck_0
Traceback (most recent call last):
File "./py.py", line 204, in ?
sys.exit(main_(sys.argv))
File "./py.py", line 82, in main_
space.setitem(space.sys.w_dict,space.wrap('executable'),space.wrap(argv[0]))
AttributeError: 'CPyObjSpace' object has no attribute 'sys'
Having almost only introductory knowledge of pypy, I thought naively
following might solve the problem
class CPyObjSpace(baseobjspace.ObjSpace):
def initialize(self):
self.config.objspace.geninterp = False
self.wrap_cache = {}
self.sys = self.getbuiltinmodule("sys") ##### <-- adding just this line
but now it errors that it can't find w_dict attribute in space.sys
(py.py:main_() #82) - still space.sys is W_Object. Maybe I need to
transform it as proper pypy interpreter module?
_______________________________________________
[email protected]
http://codespeak.net/mailman/listinfo/pypy-dev