1. Pypy
  2. Untitled project
  3. pypy


Alexander Hesse  committed 38643cd

Created rpython/_cache. Added cache_dir to rpython.conftest

  • Participants
  • Parent commits ccb69ed
  • Branches split-rpython

Comments (0)

Files changed (6)

File .hgignore

View file

File rpython/conftest.py

View file
-import os
+from os.path import *
-cdir = os.path.join(os.path.dirname(__file__), 'translator', 'c')
+cdir = realpath(join(dirname(__file__), 'translator', 'c'))
+cache_dir = realpath(join(dirname(__file__), '_cache'))

File rpython/tool/gcc_cache.py

View file
-from pypy.conftest import pypydir
 from rpython.translator.platform import CompilationError
 from rpython.translator.tool.cbuild import ExternalCompilationInfo
+from rpython.conftest import cache_dir
 from hashlib import md5
 import py
-cache_dir_root = py.path.local(pypydir).join('_cache').ensure(dir=1)
+cache_dir_root = py.path.local(cache_dir).ensure(dir=1)
 def cache_file_path(c_files, eci, cachename):
     "Builds a filename to cache compilation data"

File rpython/translator/cli/query.py

View file
 def get_cachedir():
-    import pypy
-    _cache = py.path.local(pypy.__file__).new(basename='_cache').ensure(dir=1)
+    from rpython import cache_dir
+    _cache = py.path.local(cache_dir).ensure(dir=1)
     return _cache
 def load_and_cache_assembly(name, outfile):

File rpython/translator/cli/src/query.cs

View file
         Type[] types = ass.GetTypes();
         outfile.WriteLine("# This file has been autogenerated by query.exe -- DO NOT EDIT");
-        outfile.WriteLine("from pypy.translator.cli.query import ClassDesc");
+        outfile.WriteLine("from rpython.translator.cli.query import ClassDesc");
         outfile.WriteLine("types = {}");
         foreach(Type t in types) {
             if (IgnoreType(t))

File rpython/translator/goal/translate.py

View file
 import os
 import sys
-from pypy.conftest import pypydir
+from rpython.conftest import cache_dir
 import py
-# clean up early pypy/_cache
+# clean up early rpython/_cache
-    py.path.local(pypydir).join('_cache').remove()
+    py.path.local(cache_dir).remove()
 except Exception: