1. Pypy
  2. Untitled project
  3. jitviewer

Commits

Armin Rigo  committed 41c224f

Import everything needed from 'rpython', not from 'pypy'.

  • Participants
  • Parent commits 709f1b1
  • Branches default

Comments (0)

Files changed (2)

File _jitviewer/app.py

View file
  • Ignore whitespace
 import argparse
 
 try:
-    import pypy
+    import rpython
 except ImportError:
     import __pypy__
     sys.path.append(os.path.join(__pypy__.__file__, '..', '..', '..'))
     try:
-        import pypy
+        import rpython
     except ImportError:
         failout('Could not import pypy module, make sure to '
             'add the pypy module to PYTHONPATH')
 import inspect
 import threading
 import time
+
 try:
     from rpython.tool.logparser import extract_category
 except ImportError:
     from pypy.tool.logparser import extract_category
-from pypy.tool.jitlogparser.storage import LoopStorage
-from pypy.tool.jitlogparser.parser import adjust_bridges, import_log,\
-     parse_log_counts
+try:
+    from rpython.tool.jitlogparser.storage import LoopStorage
+except ImportError:
+    from pypy.tool.jitlogparser.storage import LoopStorage
+try:
+    from rpython.tool.jitlogparser.parser import adjust_bridges, import_log,\
+         parse_log_counts
+except ImportError:
+    from pypy.tool.jitlogparser.parser import adjust_bridges, import_log,\
+         parse_log_counts
 #
 from _jitviewer.parser import ParserWithHtmlRepr, FunctionHtml
 from _jitviewer.display import CodeRepr, CodeReprNoFile

File _jitviewer/parser.py

View file
  • Ignore whitespace
 import re
 import cgi
-from pypy.tool.jitlogparser import parser
+try:
+    from rpython.tool.jitlogparser import parser
+except ImportError:
+    from pypy.tool.jitlogparser import parser
 
 def cssclass(cls, s, **kwds):
     cls = re.sub("[^\w]", "_", cls)