[pypy-commit] pypy win64-stage1: avoid py.path.local problem with empty cdrom drive

mattip noreply at buildbot.pypy.org
Sun Mar 25 09:59:46 CEST 2012


Author: mattip
Branch: win64-stage1
Changeset: r53972:0993bdbb1d59
Date: 2012-03-25 09:59 +0200
http://bitbucket.org/pypy/pypy/changeset/0993bdbb1d59/

Log:	avoid py.path.local problem with empty cdrom drive

diff --git a/pypy/rpython/tool/rffi_platform.py b/pypy/rpython/tool/rffi_platform.py
--- a/pypy/rpython/tool/rffi_platform.py
+++ b/pypy/rpython/tool/rffi_platform.py
@@ -707,14 +707,14 @@
 
 # ____________________________________________________________
 
-PYPY_EXTERNAL_DIR = py.path.local(pypydir).join('..', '..')
+PYPY_EXTERNAL_DIR =  os.path.abspath(os.path.join(pypydir,'../..'))
 # XXX make this configurable
 if sys.platform == 'win32':
     for libdir in [
-        py.path.local('c:/buildslave/support'), # on the bigboard buildbot
-        py.path.local('d:/myslave'), # on the snakepit buildbot
+        'c:/buildslave/support', # on the bigboard buildbot
+        'd:/myslave', # on the snakepit buildbot
         ]:
-        if libdir.check():
+        if os.path.exists(libdir):
             PYPY_EXTERNAL_DIR = libdir
             break
 
@@ -759,7 +759,7 @@
             if prefix and not os.path.isabs(prefix):
                 import glob
 
-                entries = glob.glob(str(PYPY_EXTERNAL_DIR.join(prefix + '*')))
+                entries = glob.glob(os.path.join(PYPY_EXTERNAL_DIR,'*'))
                 if entries:
                     # Get last version
                     prefix = sorted(entries)[-1]


More information about the pypy-commit mailing list