[pypy-svn] r10301 - pypy/dist/pypy/tool
sanxiyn at codespeak.net
sanxiyn at codespeak.net
Mon Apr 4 19:22:06 CEST 2005
Author: sanxiyn
Date: Mon Apr 4 19:22:05 2005
New Revision: 10301
Modified:
pypy/dist/pypy/tool/autopath.py
Log:
Fix autopath to remove paths from sys.path only if they are subpackages.
Especially, don't remove pypy/lib when running PyPy on PyPy.
Modified: pypy/dist/pypy/tool/autopath.py
==============================================================================
--- pypy/dist/pypy/tool/autopath.py (original)
+++ pypy/dist/pypy/tool/autopath.py Mon Apr 4 19:22:05 2005
@@ -46,8 +46,10 @@
while checkpaths:
orig = checkpaths.pop()
- if os.path.join(os.path.realpath(orig), '').startswith(pypy_root):
- sys.path.remove(orig)
+ fullorig = os.path.join(os.path.realpath(orig), '')
+ if fullorig.startswith(pypy_root):
+ if os.path.exists(os.path.join(fullorig, '__init__.py')):
+ sys.path.remove(orig)
sys.path.insert(0, head)
munged = {}
More information about the pypy-svn
mailing list