[pypy-svn] rev 1102 - in pypy/trunk/src/pypy: appspace/test interpreter interpreter/test module/test objspace/ann/test objspace/std/testtool
mwh at codespeak.net
mwh at codespeak.net
Mon Jul 7 17:56:52 CEST 2003
Author: mwh
Date: Mon Jul 7 17:56:51 2003
New Revision: 1102
Modified:
pypy/trunk/src/pypy/appspace/test/autopath.py
pypy/trunk/src/pypy/interpreter/autopath.py
pypy/trunk/src/pypy/interpreter/test/autopath.py
pypy/trunk/src/pypy/module/test/autopath.py
pypy/trunk/src/pypy/objspace/ann/test/autopath.py
pypy/trunk/src/pypy/objspace/std/test/autopath.py
pypy/trunk/src/pypy/tool/autopath.py
Log:
Changes to autopath.py:
make it work on Mac OS X (don't know what was wrong before, sorry, not that
interested in finding out)
remove directories that are inside the pypy tree from sys.path (reduces problems
with 2.3 which expects to find a module called opcode in the std library)
Modified: pypy/trunk/src/pypy/appspace/test/autopath.py
==============================================================================
--- pypy/trunk/src/pypy/appspace/test/autopath.py (original)
+++ pypy/trunk/src/pypy/appspace/test/autopath.py Mon Jul 7 17:56:51 2003
@@ -37,13 +37,15 @@
partdir = head
head, tail = os.path.split(head)
if tail == part:
+ sys.path = [p for p in sys.path if not p.startswith(head)]
if head not in sys.path:
sys.path.insert(0, head)
return partdir, this_dir
+
raise EnvironmentError, "'%s' missing in '%r'" % (pathpart,this_path)
def __clone():
- """ clone master version of autopath.y into all subdirs """
+ """ clone master version of autopath.py into all subdirs """
from os.path import join, walk
if not this_dir.endswith(join('pypy','tool')):
raise EnvironmentError("can only clone master version "
@@ -59,7 +61,7 @@
print "checkok", fn
else:
print "syncing", fn
- f.seek(0)
+ f = open(fn, 'w')
f.write(arg)
finally:
f.close()
Modified: pypy/trunk/src/pypy/interpreter/autopath.py
==============================================================================
--- pypy/trunk/src/pypy/interpreter/autopath.py (original)
+++ pypy/trunk/src/pypy/interpreter/autopath.py Mon Jul 7 17:56:51 2003
@@ -37,13 +37,15 @@
partdir = head
head, tail = os.path.split(head)
if tail == part:
+ sys.path = [p for p in sys.path if not p.startswith(head)]
if head not in sys.path:
sys.path.insert(0, head)
return partdir, this_dir
+
raise EnvironmentError, "'%s' missing in '%r'" % (pathpart,this_path)
def __clone():
- """ clone master version of autopath.y into all subdirs """
+ """ clone master version of autopath.py into all subdirs """
from os.path import join, walk
if not this_dir.endswith(join('pypy','tool')):
raise EnvironmentError("can only clone master version "
@@ -59,7 +61,7 @@
print "checkok", fn
else:
print "syncing", fn
- f.seek(0)
+ f = open(fn, 'w')
f.write(arg)
finally:
f.close()
Modified: pypy/trunk/src/pypy/interpreter/test/autopath.py
==============================================================================
--- pypy/trunk/src/pypy/interpreter/test/autopath.py (original)
+++ pypy/trunk/src/pypy/interpreter/test/autopath.py Mon Jul 7 17:56:51 2003
@@ -37,13 +37,15 @@
partdir = head
head, tail = os.path.split(head)
if tail == part:
+ sys.path = [p for p in sys.path if not p.startswith(head)]
if head not in sys.path:
sys.path.insert(0, head)
return partdir, this_dir
+
raise EnvironmentError, "'%s' missing in '%r'" % (pathpart,this_path)
def __clone():
- """ clone master version of autopath.y into all subdirs """
+ """ clone master version of autopath.py into all subdirs """
from os.path import join, walk
if not this_dir.endswith(join('pypy','tool')):
raise EnvironmentError("can only clone master version "
@@ -59,7 +61,7 @@
print "checkok", fn
else:
print "syncing", fn
- f.seek(0)
+ f = open(fn, 'w')
f.write(arg)
finally:
f.close()
Modified: pypy/trunk/src/pypy/module/test/autopath.py
==============================================================================
--- pypy/trunk/src/pypy/module/test/autopath.py (original)
+++ pypy/trunk/src/pypy/module/test/autopath.py Mon Jul 7 17:56:51 2003
@@ -37,13 +37,15 @@
partdir = head
head, tail = os.path.split(head)
if tail == part:
+ sys.path = [p for p in sys.path if not p.startswith(head)]
if head not in sys.path:
sys.path.insert(0, head)
return partdir, this_dir
+
raise EnvironmentError, "'%s' missing in '%r'" % (pathpart,this_path)
def __clone():
- """ clone master version of autopath.y into all subdirs """
+ """ clone master version of autopath.py into all subdirs """
from os.path import join, walk
if not this_dir.endswith(join('pypy','tool')):
raise EnvironmentError("can only clone master version "
@@ -59,7 +61,7 @@
print "checkok", fn
else:
print "syncing", fn
- f.seek(0)
+ f = open(fn, 'w')
f.write(arg)
finally:
f.close()
Modified: pypy/trunk/src/pypy/objspace/ann/test/autopath.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/ann/test/autopath.py (original)
+++ pypy/trunk/src/pypy/objspace/ann/test/autopath.py Mon Jul 7 17:56:51 2003
@@ -37,13 +37,15 @@
partdir = head
head, tail = os.path.split(head)
if tail == part:
+ sys.path = [p for p in sys.path if not p.startswith(head)]
if head not in sys.path:
sys.path.insert(0, head)
return partdir, this_dir
+
raise EnvironmentError, "'%s' missing in '%r'" % (pathpart,this_path)
def __clone():
- """ clone master version of autopath.y into all subdirs """
+ """ clone master version of autopath.py into all subdirs """
from os.path import join, walk
if not this_dir.endswith(join('pypy','tool')):
raise EnvironmentError("can only clone master version "
@@ -59,7 +61,7 @@
print "checkok", fn
else:
print "syncing", fn
- f.seek(0)
+ f = open(fn, 'w')
f.write(arg)
finally:
f.close()
Modified: pypy/trunk/src/pypy/objspace/std/test/autopath.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/test/autopath.py (original)
+++ pypy/trunk/src/pypy/objspace/std/test/autopath.py Mon Jul 7 17:56:51 2003
@@ -37,13 +37,15 @@
partdir = head
head, tail = os.path.split(head)
if tail == part:
+ sys.path = [p for p in sys.path if not p.startswith(head)]
if head not in sys.path:
sys.path.insert(0, head)
return partdir, this_dir
+
raise EnvironmentError, "'%s' missing in '%r'" % (pathpart,this_path)
def __clone():
- """ clone master version of autopath.y into all subdirs """
+ """ clone master version of autopath.py into all subdirs """
from os.path import join, walk
if not this_dir.endswith(join('pypy','tool')):
raise EnvironmentError("can only clone master version "
@@ -59,7 +61,7 @@
print "checkok", fn
else:
print "syncing", fn
- f.seek(0)
+ f = open(fn, 'w')
f.write(arg)
finally:
f.close()
Modified: pypy/trunk/src/pypy/tool/autopath.py
==============================================================================
--- pypy/trunk/src/pypy/tool/autopath.py (original)
+++ pypy/trunk/src/pypy/tool/autopath.py Mon Jul 7 17:56:51 2003
@@ -37,13 +37,15 @@
partdir = head
head, tail = os.path.split(head)
if tail == part:
+ sys.path = [p for p in sys.path if not p.startswith(head)]
if head not in sys.path:
sys.path.insert(0, head)
return partdir, this_dir
+
raise EnvironmentError, "'%s' missing in '%r'" % (pathpart,this_path)
def __clone():
- """ clone master version of autopath.y into all subdirs """
+ """ clone master version of autopath.py into all subdirs """
from os.path import join, walk
if not this_dir.endswith(join('pypy','tool')):
raise EnvironmentError("can only clone master version "
@@ -59,7 +61,7 @@
print "checkok", fn
else:
print "syncing", fn
- f.seek(0)
+ f = open(fn, 'w')
f.write(arg)
finally:
f.close()
More information about the Pypy-commit
mailing list