[pypy-svn] r10979 - in pypy/dist/pypy: annotation/test documentation/revreport interpreter interpreter/test lib/test2 module/test objspace/flow/test objspace/std objspace/std/test objspace/test tool tool/test translator translator/genc translator/genc/test translator/java translator/java/test translator/llvm translator/llvm/test translator/test translator/tool translator/tool/pygame
sanxiyn at codespeak.net
sanxiyn at codespeak.net
Thu Apr 21 18:40:12 CEST 2005
Author: sanxiyn
Date: Thu Apr 21 17:42:26 2005
New Revision: 10979
Modified:
pypy/dist/pypy/annotation/test/autopath.py
pypy/dist/pypy/documentation/revreport/autopath.py
pypy/dist/pypy/interpreter/autopath.py
pypy/dist/pypy/interpreter/test/autopath.py
pypy/dist/pypy/lib/test2/autopath.py
pypy/dist/pypy/module/test/autopath.py
pypy/dist/pypy/objspace/flow/test/autopath.py
pypy/dist/pypy/objspace/std/autopath.py
pypy/dist/pypy/objspace/std/test/autopath.py
pypy/dist/pypy/objspace/test/autopath.py
pypy/dist/pypy/tool/autopath.py
pypy/dist/pypy/tool/test/autopath.py
pypy/dist/pypy/translator/autopath.py
pypy/dist/pypy/translator/genc/autopath.py
pypy/dist/pypy/translator/genc/test/autopath.py
pypy/dist/pypy/translator/java/autopath.py
pypy/dist/pypy/translator/java/test/autopath.py
pypy/dist/pypy/translator/llvm/autopath.py
pypy/dist/pypy/translator/llvm/test/autopath.py
pypy/dist/pypy/translator/test/autopath.py
pypy/dist/pypy/translator/tool/autopath.py
pypy/dist/pypy/translator/tool/pygame/autopath.py
Log:
Autopath: do not add to sys.path over and over
Modified: pypy/dist/pypy/annotation/test/autopath.py
==============================================================================
--- pypy/dist/pypy/annotation/test/autopath.py (original)
+++ pypy/dist/pypy/annotation/test/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/documentation/revreport/autopath.py
==============================================================================
--- pypy/dist/pypy/documentation/revreport/autopath.py (original)
+++ pypy/dist/pypy/documentation/revreport/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/interpreter/autopath.py
==============================================================================
--- pypy/dist/pypy/interpreter/autopath.py (original)
+++ pypy/dist/pypy/interpreter/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/interpreter/test/autopath.py
==============================================================================
--- pypy/dist/pypy/interpreter/test/autopath.py (original)
+++ pypy/dist/pypy/interpreter/test/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/lib/test2/autopath.py
==============================================================================
--- pypy/dist/pypy/lib/test2/autopath.py (original)
+++ pypy/dist/pypy/lib/test2/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/module/test/autopath.py
==============================================================================
--- pypy/dist/pypy/module/test/autopath.py (original)
+++ pypy/dist/pypy/module/test/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/objspace/flow/test/autopath.py
==============================================================================
--- pypy/dist/pypy/objspace/flow/test/autopath.py (original)
+++ pypy/dist/pypy/objspace/flow/test/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/objspace/std/autopath.py
==============================================================================
--- pypy/dist/pypy/objspace/std/autopath.py (original)
+++ pypy/dist/pypy/objspace/std/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/objspace/std/test/autopath.py
==============================================================================
--- pypy/dist/pypy/objspace/std/test/autopath.py (original)
+++ pypy/dist/pypy/objspace/std/test/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/objspace/test/autopath.py
==============================================================================
--- pypy/dist/pypy/objspace/test/autopath.py (original)
+++ pypy/dist/pypy/objspace/test/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/tool/autopath.py
==============================================================================
--- pypy/dist/pypy/tool/autopath.py (original)
+++ pypy/dist/pypy/tool/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/tool/test/autopath.py
==============================================================================
--- pypy/dist/pypy/tool/test/autopath.py (original)
+++ pypy/dist/pypy/tool/test/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/translator/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/autopath.py (original)
+++ pypy/dist/pypy/translator/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/translator/genc/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/genc/autopath.py (original)
+++ pypy/dist/pypy/translator/genc/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/translator/genc/test/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/genc/test/autopath.py (original)
+++ pypy/dist/pypy/translator/genc/test/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/translator/java/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/java/autopath.py (original)
+++ pypy/dist/pypy/translator/java/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/translator/java/test/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/java/test/autopath.py (original)
+++ pypy/dist/pypy/translator/java/test/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/translator/llvm/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/autopath.py (original)
+++ pypy/dist/pypy/translator/llvm/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/translator/llvm/test/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/test/autopath.py (original)
+++ pypy/dist/pypy/translator/llvm/test/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/translator/test/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/test/autopath.py (original)
+++ pypy/dist/pypy/translator/test/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/translator/tool/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/tool/autopath.py (original)
+++ pypy/dist/pypy/translator/tool/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
Modified: pypy/dist/pypy/translator/tool/pygame/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/tool/pygame/autopath.py (original)
+++ pypy/dist/pypy/translator/tool/pygame/autopath.py Thu Apr 21 17:42:26 2005
@@ -50,7 +50,8 @@
if fullorig.startswith(pypy_root):
if os.path.exists(os.path.join(fullorig, '__init__.py')):
sys.path.remove(orig)
- sys.path.insert(0, head)
+ if head not in sys.path:
+ sys.path.insert(0, head)
munged = {}
for name, mod in sys.modules.items():
More information about the Pypy-commit
mailing list