Author: Alexander Hesse <[email protected]>
Branch: split-rpython
Changeset: r59892:38643cd3eaf1
Date: 2013-01-09 19:28 +0100
http://bitbucket.org/pypy/pypy/changeset/38643cd3eaf1/

Log:    Created rpython/_cache. Added cache_dir to rpython.conftest

diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -85,3 +85,4 @@
 ^compiled
 ^.git/
 ^release/
+^rpython/_cache$
diff --git a/rpython/conftest.py b/rpython/conftest.py
--- a/rpython/conftest.py
+++ b/rpython/conftest.py
@@ -1,3 +1,4 @@
-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'))
diff --git a/rpython/tool/gcc_cache.py b/rpython/tool/gcc_cache.py
--- a/rpython/tool/gcc_cache.py
+++ b/rpython/tool/gcc_cache.py
@@ -1,10 +1,10 @@
-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"
diff --git a/rpython/translator/cli/query.py b/rpython/translator/cli/query.py
--- a/rpython/translator/cli/query.py
+++ b/rpython/translator/cli/query.py
@@ -65,8 +65,8 @@
 
 
 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):
diff --git a/rpython/translator/cli/src/query.cs 
b/rpython/translator/cli/src/query.cs
--- a/rpython/translator/cli/src/query.cs
+++ b/rpython/translator/cli/src/query.cs
@@ -42,7 +42,7 @@
     {
         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))
diff --git a/rpython/translator/goal/translate.py 
b/rpython/translator/goal/translate.py
--- a/rpython/translator/goal/translate.py
+++ b/rpython/translator/goal/translate.py
@@ -7,12 +7,12 @@
 
 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
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to