[pypy-svn] r18821 - pypy/dist/pypy/translator/goal
mwh at codespeak.net
mwh at codespeak.net
Fri Oct 21 14:33:05 CEST 2005
Author: mwh
Date: Fri Oct 21 14:33:05 2005
New Revision: 18821
Modified:
pypy/dist/pypy/translator/goal/translate_pypy.py
Log:
exec the targetblah.py file with a given __name__ -- otherwise classes
defined in the file end up with a __module__ of __builtin__ and hilarity
ensues.
Modified: pypy/dist/pypy/translator/goal/translate_pypy.py
==============================================================================
--- pypy/dist/pypy/translator/goal/translate_pypy.py (original)
+++ pypy/dist/pypy/translator/goal/translate_pypy.py Fri Oct 21 14:33:05 2005
@@ -149,7 +149,7 @@
log.info("Translating target as defined by %s" % targetspec)
if not targetspec.endswith('.py'):
targetspec += '.py'
- targetspec_dic = {}
+ targetspec_dic = {'__name__':'__rpythonmain__'}
sys.path.insert(0, os.path.dirname(targetspec))
execfile(targetspec, targetspec_dic)
return targetspec_dic
More information about the Pypy-commit
mailing list