[pypy-svn] r12981 - pypy/dist/pypy/translator/goal

pedronis at codespeak.net pedronis at codespeak.net
Wed Jun 1 17:11:21 CEST 2005

Author: pedronis
Date: Wed Jun  1 17:11:21 2005
New Revision: 12981

   pypy/dist/pypy/translator/goal/   (props changed)
__path__ surgery such that translation_pypy will operate on interpreter/ module/ objspace/ (apart flow) content
from a snapshot branch that should be checked out in goal.

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	Wed Jun  1 17:11:21 2005
@@ -26,7 +26,37 @@
    -huge=%    Threshold in the number of functions after which only a local call
               graph and not a full one is displayed
-import autopath, sys, threading, pdb, os
+import autopath, sys, os
+# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+basedir = autopath.this_dir
+pypy_translation_snapshot_dir = os.path.join(basedir, 'pypy-translation-snapshot')
+if not os.path.isdir(pypy_translation_snapshot_dir):
+    print """
+Translation is performed on a specific revision of PyPy which lives on
+a branch. This needs to be checked out into translator/goal with:
+svn co http://codespeak.net/svn/pypy/branch/pypy-translation-snapshot
+    sys.exit(2)
+# override imports from pypy head with imports from pypy-translation-snapshot
+import pypy
+pypy.__path__.insert(0, pypy_translation_snapshot_dir)
+# complement imports from pypy.objspace (from pypy-translation-snapshot)
+# with pypy head objspace/
+import pypy.objspace
+pypy.objspace.__path__.append(os.path.join(autopath.pypydir, 'objspace'))
+print "imports redirected to pypy-translation-snapshot."
+# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+import threading, pdb
 from pypy.translator.translator import Translator
 from pypy.translator.ann_override import pypy_overrides

More information about the Pypy-commit mailing list