Author: Alexander Hesse <[email protected]>
Branch: split-rpython
Changeset: r59703:dfa35f50ad74
Date: 2013-01-02 17:47 +0100
http://bitbucket.org/pypy/pypy/changeset/dfa35f50ad74/

Log:    Changed autopath.py in rpython to search for rpython directory

diff --git a/rpython/annotator/test/autopath.py 
b/rpython/annotator/test/autopath.py
--- a/rpython/annotator/test/autopath.py
+++ b/rpython/annotator/test/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('rpython')
+rpythondir, this_dir = __dirinfo('rpython')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/jit/backend/autopath.py b/rpython/jit/backend/autopath.py
--- a/rpython/jit/backend/autopath.py
+++ b/rpython/jit/backend/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('rpython')
+rpythondir, this_dir = __dirinfo('rpython')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/jit/backend/x86/autopath.py 
b/rpython/jit/backend/x86/autopath.py
--- a/rpython/jit/backend/x86/autopath.py
+++ b/rpython/jit/backend/x86/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('rpython')
+rpythondir, this_dir = __dirinfo('rpython')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/jit/backend/x86/tool/autopath.py 
b/rpython/jit/backend/x86/tool/autopath.py
--- a/rpython/jit/backend/x86/tool/autopath.py
+++ b/rpython/jit/backend/x86/tool/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('rpython')
+rpythondir, this_dir = __dirinfo('rpython')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/jit/tl/autopath.py b/rpython/jit/tl/autopath.py
--- a/rpython/jit/tl/autopath.py
+++ b/rpython/jit/tl/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('rpython')
+rpythondir, this_dir = __dirinfo('rpython')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/jit/tl/spli/autopath.py b/rpython/jit/tl/spli/autopath.py
--- a/rpython/jit/tl/spli/autopath.py
+++ b/rpython/jit/tl/spli/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('rpython')
+rpythondir, this_dir = __dirinfo('rpython')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/jit/tool/autopath.py b/rpython/jit/tool/autopath.py
--- a/rpython/jit/tool/autopath.py
+++ b/rpython/jit/tool/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('rpython')
+rpythondir, this_dir = __dirinfo('rpython')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/rlib/_rffi_stacklet.py b/rpython/rlib/_rffi_stacklet.py
--- a/rpython/rlib/_rffi_stacklet.py
+++ b/rpython/rlib/_rffi_stacklet.py
@@ -1,5 +1,5 @@
 import py
-from pypy.tool.autopath import pypydir
+from rpython.tool.autopath import rpythondir
 from rpython.rtyper.lltypesystem import lltype, llmemory, rffi
 from rpython.translator.tool.cbuild import ExternalCompilationInfo
 from rpython.rtyper.tool import rffi_platform
@@ -7,7 +7,7 @@
 import sys
 
 
-cdir = py.path.local(pypydir) / 'translator' / 'c'
+cdir = py.path.local(rpythondir) / 'translator' / 'c'
 
 eci = ExternalCompilationInfo(
     include_dirs = [cdir],
diff --git a/rpython/rlib/clibffi.py b/rpython/rlib/clibffi.py
--- a/rpython/rlib/clibffi.py
+++ b/rpython/rlib/clibffi.py
@@ -12,7 +12,7 @@
 from rpython.rlib.rdynload import DLOpenError, DLLHANDLE
 from rpython.rlib import jit
 from rpython.rlib.objectmodel import specialize
-from pypy.tool.autopath import pypydir
+from rpython.tool.autopath import rpythondir
 from rpython.translator.tool.cbuild import ExternalCompilationInfo
 from rpython.translator.platform import platform
 import py
@@ -122,7 +122,7 @@
          ])
 else:
     USE_C_LIBFFI_MSVC = True
-    libffidir = py.path.local(pypydir).join('translator', 'c', 'src', 
'libffi_msvc')
+    libffidir = py.path.local(rpythondir).join('translator', 'c', 'src', 
'libffi_msvc')
     if not _WIN64:
         asm_ifc = 'win32.c'
     else:
diff --git a/rpython/rlib/parsing/test/autopath.py 
b/rpython/rlib/parsing/test/autopath.py
--- a/rpython/rlib/parsing/test/autopath.py
+++ b/rpython/rlib/parsing/test/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('rpython')
+rpythondir, this_dir = __dirinfo('rpython')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/rlib/rdtoa.py b/rpython/rlib/rdtoa.py
--- a/rpython/rlib/rdtoa.py
+++ b/rpython/rlib/rdtoa.py
@@ -1,13 +1,13 @@
 from __future__ import with_statement
 from rpython.rlib import rfloat
 from rpython.translator.tool.cbuild import ExternalCompilationInfo
-from pypy.tool.autopath import pypydir
+from rpython.tool.autopath import rpythondir
 from rpython.rtyper.lltypesystem import lltype, rffi
 from rpython.rlib import jit
 from rpython.rlib.rstring import StringBuilder
 import py, sys
 
-cdir = py.path.local(pypydir) / 'translator' / 'c'
+cdir = py.path.local(rpythondir) / 'translator' / 'c'
 include_dirs = [cdir]
 
 # set the word endianness based on the host's endianness
diff --git a/rpython/rlib/rstack.py b/rpython/rlib/rstack.py
--- a/rpython/rlib/rstack.py
+++ b/rpython/rlib/rstack.py
@@ -14,12 +14,12 @@
 from rpython.rtyper.lltypesystem import lltype, rffi
 from rpython.rtyper.lltypesystem.lloperation import llop
 from rpython.rtyper.controllerentry import Controller, SomeControlledInstance
-from pypy.tool.autopath import pypydir
+from rpython.tool.autopath import rpythondir
 from rpython.translator.tool.cbuild import ExternalCompilationInfo
 
 # ____________________________________________________________
 
-srcdir = py.path.local(pypydir) / 'translator' / 'c' / 'src'
+srcdir = py.path.local(rpythondir) / 'translator' / 'c' / 'src'
 compilation_info = ExternalCompilationInfo(
         includes=['src/stack.h'],
         separate_module_files=[srcdir / 'stack.c', srcdir / 'threadlocal.c'])
diff --git a/rpython/rlib/test/autopath.py b/rpython/rlib/test/autopath.py
--- a/rpython/rlib/test/autopath.py
+++ b/rpython/rlib/test/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('rpython')
+rpythondir, this_dir = __dirinfo('rpython')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/rtyper/lltypesystem/module/ll_math.py 
b/rpython/rtyper/lltypesystem/module/ll_math.py
--- a/rpython/rtyper/lltypesystem/module/ll_math.py
+++ b/rpython/rtyper/lltypesystem/module/ll_math.py
@@ -5,7 +5,7 @@
 
 from rpython.rtyper.lltypesystem import lltype, rffi
 from rpython.tool.sourcetools import func_with_new_name
-from pypy.tool.autopath import pypydir
+from rpython.tool.autopath import rpythondir
 from rpython.rlib import jit, rposix
 from rpython.translator.tool.cbuild import ExternalCompilationInfo
 from rpython.translator.platform import platform
@@ -25,7 +25,7 @@
     else:
         eci = ExternalCompilationInfo()
     # Some math functions are C99 and not defined by the Microsoft compiler
-    cdir = py.path.local(pypydir).join('translator', 'c')
+    cdir = py.path.local(rpythondir).join('translator', 'c')
     math_eci = ExternalCompilationInfo(
         include_dirs = [cdir],
         includes = ['src/ll_math.h'],
diff --git a/rpython/rtyper/module/ll_strtod.py 
b/rpython/rtyper/module/ll_strtod.py
--- a/rpython/rtyper/module/ll_strtod.py
+++ b/rpython/rtyper/module/ll_strtod.py
@@ -3,17 +3,17 @@
 from rpython.rtyper.extfunc import BaseLazyRegistering, extdef, registering
 from rpython.rlib import rfloat
 from rpython.rtyper.lltypesystem import lltype, rffi
-from pypy.tool.autopath import pypydir
+from rpython.tool.autopath import rpythondir
 from rpython.rtyper.ootypesystem import ootype
 from rpython.rlib import rposix
 from rpython.translator.tool.cbuild import ExternalCompilationInfo
-from pypy.tool.autopath import pypydir
+from rpython.tool.autopath import rpythondir
 from rpython.annotator.model import SomeString
 
 class CConfig:
     _compilation_info_ = ExternalCompilationInfo(
         includes = ['src/ll_strtod.h'],
-        include_dirs = [str(py.path.local(pypydir).join('translator', 'c'))],
+        include_dirs = [str(py.path.local(rpythondir).join('translator', 
'c'))],
         separate_module_sources = ['#include <src/ll_strtod.c>'],
         export_symbols = ['LL_strtod_formatd', 'LL_strtod_parts_to_float'],
     )
diff --git a/rpython/rtyper/tool/rffi_platform.py 
b/rpython/rtyper/tool/rffi_platform.py
--- a/rpython/rtyper/tool/rffi_platform.py
+++ b/rpython/rtyper/tool/rffi_platform.py
@@ -11,7 +11,7 @@
 from rpython.translator.tool.cbuild import ExternalCompilationInfo
 from rpython.translator.platform import CompilationError
 from rpython.tool.udir import udir
-from pypy.tool.autopath import pypydir
+from rpython.tool.autopath import rpythondir
 from rpython.rlib.rarithmetic import r_uint, r_longlong, r_ulonglong, intmask
 
 # ____________________________________________________________
@@ -738,7 +738,7 @@
 
 # ____________________________________________________________
 
-PYPY_EXTERNAL_DIR = py.path.local(pypydir).join('..', '..')
+PYPY_EXTERNAL_DIR = py.path.local(rpythondir).join('..', '..')
 # XXX make this configurable
 if sys.platform == 'win32':
     for libdir in [
diff --git a/rpython/tool/algo/test/autopath.py 
b/rpython/tool/algo/test/autopath.py
--- a/rpython/tool/algo/test/autopath.py
+++ b/rpython/tool/algo/test/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('pypy')
+rpythondir, this_dir = __dirinfo('pypy')
 
 if __name__ == '__main__':
     __clone()
diff --git a/pypy/tool/autopath.py b/rpython/tool/autopath.py
copy from pypy/tool/autopath.py
copy to rpython/tool/autopath.py
--- a/pypy/tool/autopath.py
+++ b/rpython/tool/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('pypy')
+rpythondir, this_dir = __dirinfo('pypy')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/translator/autopath.py b/rpython/translator/autopath.py
--- a/rpython/translator/autopath.py
+++ b/rpython/translator/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('rpython')
+rpythondir, this_dir = __dirinfo('rpython')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/translator/c/autopath.py b/rpython/translator/c/autopath.py
--- a/rpython/translator/c/autopath.py
+++ b/rpython/translator/c/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('rpython')
+rpythondir, this_dir = __dirinfo('rpython')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/translator/c/gcc/autopath.py 
b/rpython/translator/c/gcc/autopath.py
--- a/rpython/translator/c/gcc/autopath.py
+++ b/rpython/translator/c/gcc/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('rpython')
+rpythondir, this_dir = __dirinfo('rpython')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/translator/c/genc.py b/rpython/translator/c/genc.py
--- a/rpython/translator/c/genc.py
+++ b/rpython/translator/c/genc.py
@@ -132,7 +132,7 @@
         self.secondary_entrypoints = secondary_entrypoints
 
     def get_eci(self):
-        pypy_include_dir = py.path.local(autopath.pypydir).join('translator', 
'c')
+        pypy_include_dir = 
py.path.local(autopath.rpythondir).join('translator', 'c')
         include_dirs = [pypy_include_dir]
         return ExternalCompilationInfo(include_dirs=include_dirs)
 
@@ -754,7 +754,7 @@
     defines['PYPY_LONGLONG_BIT'] = LONGLONG_BIT
 
 def add_extra_files(eci):
-    srcdir = py.path.local(autopath.pypydir).join('translator', 'c', 'src')
+    srcdir = py.path.local(autopath.rpythondir).join('translator', 'c', 'src')
     files = [
         srcdir / 'entrypoint.c',       # ifdef PYPY_STANDALONE
         srcdir / 'allocator.c',        # ifdef PYPY_STANDALONE
diff --git a/rpython/translator/c/test/autopath.py 
b/rpython/translator/c/test/autopath.py
--- a/rpython/translator/c/test/autopath.py
+++ b/rpython/translator/c/test/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('rpython')
+rpythondir, this_dir = __dirinfo('rpython')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/translator/c/test/test_standalone.py 
b/rpython/translator/c/test/test_standalone.py
--- a/rpython/translator/c/test/test_standalone.py
+++ b/rpython/translator/c/test/test_standalone.py
@@ -10,7 +10,7 @@
 from rpython.translator.c.genc import CStandaloneBuilder, 
ExternalCompilationInfo
 from rpython.annotator.listdef import s_list_of_strings
 from rpython.tool.udir import udir
-from pypy.tool.autopath import pypydir
+from rpython.tool.autopath import rpythondir
 from pypy.conftest import option
 
 
@@ -240,7 +240,7 @@
 
     def test_separate_files(self):
         # One file in translator/c/src
-        fname = py.path.local(pypydir).join(
+        fname = py.path.local(rpythondir).join(
             'translator', 'c', 'src', 'll_strtod.c')
 
         # One file in (another) subdir of the temp directory
diff --git a/rpython/translator/cli/gencli.py b/rpython/translator/cli/gencli.py
--- a/rpython/translator/cli/gencli.py
+++ b/rpython/translator/cli/gencli.py
@@ -92,7 +92,7 @@
         if timeout and not sys.platform.startswith('win'):
             import os
             from pypy.tool import autopath
-            watchdog = os.path.join(autopath.pypydir, 'tool', 'watchdog.py')
+            watchdog = os.path.join(autopath.rpythondir, 'tool', 'watchdog.py')
             args[:0] = [sys.executable, watchdog, str(float(timeout))]
         proc = subprocess.Popen(args, stdout=subprocess.PIPE, 
stderr=subprocess.PIPE)
         stdout, stderr = proc.communicate()
diff --git a/rpython/translator/cli/test/autopath.py 
b/rpython/translator/cli/test/autopath.py
--- a/rpython/translator/cli/test/autopath.py
+++ b/rpython/translator/cli/test/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('rpython')
+rpythondir, this_dir = __dirinfo('rpython')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/translator/goal/autopath.py 
b/rpython/translator/goal/autopath.py
--- a/rpython/translator/goal/autopath.py
+++ b/rpython/translator/goal/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('rpython')
+rpythondir, this_dir = __dirinfo('rpython')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/translator/goal/test2/autopath.py 
b/rpython/translator/goal/test2/autopath.py
--- a/rpython/translator/goal/test2/autopath.py
+++ b/rpython/translator/goal/test2/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('rpython')
+rpythondir, this_dir = __dirinfo('rpython')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/translator/goal/test2/test_app_main.py 
b/rpython/translator/goal/test2/test_app_main.py
--- a/rpython/translator/goal/test2/test_app_main.py
+++ b/rpython/translator/goal/test2/test_app_main.py
@@ -523,7 +523,7 @@
             assert line.rstrip() == 'Not at all. They could be carried.'
             print 'A five ounce bird could not carry a one pound coconut.'
             """)
-        py_py = os.path.join(autopath.pypydir, 'bin', 'py.py')
+        py_py = os.path.join(autopath.rpythondir, 'bin', 'py.py')
         child = self._spawn(sys.executable, [py_py, '-S', path])
         child.expect('Are you suggesting coconuts migrate?', timeout=120)
         child.sendline('Not at all. They could be carried.')
@@ -850,7 +850,7 @@
         self.w_goal_dir = self.space.wrap(goal_dir)
         self.w_fake_exe = self.space.wrap(str(fake_exe))
         self.w_expected_path = self.space.wrap(expected_path)
-        self.w_trunkdir = self.space.wrap(os.path.dirname(autopath.pypydir))
+        self.w_trunkdir = self.space.wrap(os.path.dirname(autopath.rpythondir))
         #
         foo_py = prefix.join('foo.py').write("pass")
         self.w_foo_py = self.space.wrap(str(foo_py))
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
@@ -12,7 +12,7 @@
 import py
 # clean up early pypy/_cache
 try:
-    py.path.local(autopath.pypydir).join('_cache').remove()
+    py.path.local(autopath.rpythondir).join('_cache').remove()
 except Exception:
     pass
 
diff --git a/rpython/translator/platform/posix.py 
b/rpython/translator/platform/posix.py
--- a/rpython/translator/platform/posix.py
+++ b/rpython/translator/platform/posix.py
@@ -88,7 +88,7 @@
         if path is None:
             path = cfiles[0].dirpath()
 
-        pypypath = py.path.local(autopath.pypydir)
+        pypypath = py.path.local(autopath.rpythondir)
 
         if exe_name is None:
             exe_name = cfiles[0].new(ext=self.exe_ext)
@@ -139,7 +139,7 @@
 
         m.comment('automatically generated makefile')
         definitions = [
-            ('PYPYDIR', '"%s"' % autopath.pypydir),
+            ('PYPYDIR', '"%s"' % autopath.rpythondir),
             ('TARGET', target_name),
             ('DEFAULT_TARGET', exe_name.basename),
             ('SOURCES', rel_cfiles),
diff --git a/rpython/translator/platform/windows.py 
b/rpython/translator/platform/windows.py
--- a/rpython/translator/platform/windows.py
+++ b/rpython/translator/platform/windows.py
@@ -252,7 +252,7 @@
         if path is None:
             path = cfiles[0].dirpath()
 
-        pypypath = py.path.local(autopath.pypydir)
+        pypypath = py.path.local(autopath.rpythondir)
 
         if exe_name is None:
             exe_name = cfiles[0].new(ext=self.exe_ext)
@@ -294,7 +294,7 @@
 
         m.comment('automatically generated makefile')
         definitions = [
-            ('PYPYDIR', autopath.pypydir),
+            ('PYPYDIR', autopath.rpythondir),
             ('TARGET', target_name),
             ('DEFAULT_TARGET', exe_name.basename),
             ('SOURCES', rel_cfiles),
diff --git a/rpython/translator/sandbox/autopath.py 
b/rpython/translator/sandbox/autopath.py
--- a/rpython/translator/sandbox/autopath.py
+++ b/rpython/translator/sandbox/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('rpython')
+rpythondir, this_dir = __dirinfo('rpython')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/translator/sandbox/test/autopath.py 
b/rpython/translator/sandbox/test/autopath.py
--- a/rpython/translator/sandbox/test/autopath.py
+++ b/rpython/translator/sandbox/test/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('rpython')
+rpythondir, this_dir = __dirinfo('rpython')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/translator/test/autopath.py 
b/rpython/translator/test/autopath.py
--- a/rpython/translator/test/autopath.py
+++ b/rpython/translator/test/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('rpython')
+rpythondir, this_dir = __dirinfo('rpython')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/translator/tool/autopath.py 
b/rpython/translator/tool/autopath.py
--- a/rpython/translator/tool/autopath.py
+++ b/rpython/translator/tool/autopath.py
@@ -16,7 +16,7 @@
 
 This module always provides these attributes:
 
-    pypydir    pypy root directory path 
+    rpythondir    rpython root directory path 
     this_dir   directory where this autopath.py resides 
 
 """
@@ -37,7 +37,7 @@
         partdir = head
         head, tail = os.path.split(head)
         if tail == part:
-            checkfile = os.path.join(partdir, os.pardir, 'pypy', '__init__.py')
+            checkfile = os.path.join(partdir, os.pardir, 'rpython', 
'__init__.py')
             if not os.path.exists(checkfile):
                 error = "Cannot find %r" % (os.path.normpath(checkfile),)
             break
@@ -102,7 +102,7 @@
     from os.path import join, walk
     if not this_dir.endswith(join('pypy','tool')):
         raise EnvironmentError("can only clone master version "
-                               "'%s'" % join(pypydir, 'tool',_myname))
+                               "'%s'" % join(rpythondir, 'tool',_myname))
 
 
     def sync_walker(arg, dirname, fnames):
@@ -118,14 +118,14 @@
                     f.write(arg)
             finally:
                 f.close()
-    s = open(join(pypydir, 'tool', _myname), 'rb').read()
-    walk(pypydir, sync_walker, s)
+    s = open(join(rpythondir, 'tool', _myname), 'rb').read()
+    walk(rpythondir, sync_walker, s)
 
 _myname = 'autopath.py'
 
 # set guaranteed attributes
 
-pypydir, this_dir = __dirinfo('rpython')
+rpythondir, this_dir = __dirinfo('rpython')
 
 if __name__ == '__main__':
     __clone()
diff --git a/rpython/translator/tool/cbuild.py 
b/rpython/translator/tool/cbuild.py
--- a/rpython/translator/tool/cbuild.py
+++ b/rpython/translator/tool/cbuild.py
@@ -1,7 +1,7 @@
 import py
 import sys
 
-from pypy.tool.autopath import pypydir
+from rpython.tool.autopath import rpythondir
 from rpython.translator.platform import host
 from rpython.tool.udir import udir
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to