Alexander Hesse avatar Alexander Hesse committed 38643cd

Created rpython/_cache. Added cache_dir to rpython.conftest

Comments (0)

Files changed (6)

 ^compiled
 ^.git/
 ^release/
+^rpython/_cache$

rpython/conftest.py

-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'))

rpython/tool/gcc_cache.py

-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"

rpython/translator/cli/query.py

 
 
 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):

rpython/translator/cli/src/query.cs

     {
         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))

rpython/translator/goal/translate.py

 
 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
 try:
-    py.path.local(pypydir).join('_cache').remove()
+    py.path.local(cache_dir).remove()
 except Exception:
     pass
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.