Commits

Alexander Hesse committed 4fb5e08

Moved pypy.tool.compat to rpython

  • Participants
  • Parent commits cc7885d
  • Branches split-rpython

Comments (0)

Files changed (5)

pypy/tool/compat.py

-
-try:
-    # Preferred way since python 2.6
-    from hashlib import md5
-except ImportError:
-    try:
-        from md5 import md5
-    except ImportError:
-        # no _md5 module on this platform. Try hard to find a pure-python one
-        # by fishing it from lib_pypy
-        from pypy.tool.lib_pypy import import_from_lib_pypy
-        md5 = import_from_lib_pypy('md5')
-        del import_from_lib_pypy

rpython/tool/compat.py

+
+try:
+    # Preferred way since python 2.6
+    from hashlib import md5
+except ImportError:
+    try:
+        from md5 import md5
+    except ImportError:
+        # no _md5 module on this platform. Try hard to find a pure-python one
+        # by fishing it from lib_pypy
+        from pypy.tool.lib_pypy import import_from_lib_pypy
+        md5 = import_from_lib_pypy('md5')
+        del import_from_lib_pypy

rpython/tool/gcc_cache.py

 from pypy.conftest import pypydir
 from rpython.translator.platform import CompilationError
 from rpython.translator.tool.cbuild import ExternalCompilationInfo
-from pypy.tool.compat import md5
+from rpython.tool.compat import md5
 import py
 
 cache_dir_root = py.path.local(pypydir).join('_cache').ensure(dir=1)

rpython/translator/backendopt/stat.py

 from rpython.translator.simplify import get_graph
-from pypy.tool.compat import md5
+from rpython.tool.compat import md5
 
 def get_statistics(graph, translator, save_per_graph_details=None, ignore_stack_checks=False):
     seen_graphs = {}

rpython/translator/backendopt/support.py

     return loop
 
 def md5digest(translator):
-    from pypy.tool.compat import md5
+    from rpython.tool.compat import md5
     graph2digest = {}
     for graph in translator.graphs:
         m = md5()