[pypy-svn] r33491 - pypy/branch/even-more-config3/pypy/translator/goal
cfbolz at codespeak.net
cfbolz at codespeak.net
Fri Oct 20 10:37:08 CEST 2006
Author: cfbolz
Date: Fri Oct 20 10:37:06 2006
New Revision: 33491
Modified:
pypy/branch/even-more-config3/pypy/translator/goal/targetpypystandalone.py
Log:
add the translation info to pypy's sys module again. It's somewhat hard to read
but all the info is there.
Modified: pypy/branch/even-more-config3/pypy/translator/goal/targetpypystandalone.py
==============================================================================
--- pypy/branch/even-more-config3/pypy/translator/goal/targetpypystandalone.py (original)
+++ pypy/branch/even-more-config3/pypy/translator/goal/targetpypystandalone.py Fri Oct 20 10:37:06 2006
@@ -104,10 +104,12 @@
global space, entry_point
# obscure hack to stuff the translation options into the translated PyPy
- # XXX fix this
- #import pypy.module.sys
- #wrapstr = 'space.wrap(%r)' % (options.__dict__)
- #pypy.module.sys.Module.interpleveldefs['pypy_translation_info'] = wrapstr
+ import pypy.module.sys
+ paths = config.getpaths()
+ options = dict([(path, getattr(config, path)) for path in paths])
+ wrapstr = 'space.wrap(%r)' % (options)
+ print wrapstr
+ pypy.module.sys.Module.interpleveldefs['pypy_translation_info'] = wrapstr
if config.translation.thread:
config.objspace.usemodules.thread = True
@@ -125,7 +127,7 @@
import translate
translate.log_config(config.objspace, "PyPy config object")
-
+
return self.get_entry_point(config)
def get_entry_point(self, config):
More information about the Pypy-commit
mailing list