[pypy-svn] r34229 - in pypy/dist/pypy: annotation/test bin config interpreter interpreter/pyparser/test interpreter/test lib/test2 module/__builtin__/test module/_codecs/test module/_sre/test module/sys/test objspace/flow/test objspace/std objspace/std/test objspace/test rlib rlib/test rpython/rctypes/tool tool tool/algo/test tool/build/bin tool/pytest tool/test translator translator/asm translator/asm/ppcgen translator/asm/ppcgen/test translator/asm/test translator/c translator/c/test translator/cl/test translator/cli/test translator/goal translator/js translator/js/demo/jsdemo translator/js/examples translator/llvm/demo translator/llvm/pyllvm translator/microbench/pybench translator/pyrex translator/pyrex/test translator/test translator/tool translator/tool/pygame
arigo at codespeak.net
arigo at codespeak.net
Sun Nov 5 12:45:46 CET 2006
Author: arigo
Date: Sun Nov 5 12:45:39 2006
New Revision: 34229
Modified:
pypy/dist/pypy/annotation/test/autopath.py
pypy/dist/pypy/bin/autopath.py
pypy/dist/pypy/config/autopath.py
pypy/dist/pypy/interpreter/autopath.py
pypy/dist/pypy/interpreter/pyparser/test/autopath.py
pypy/dist/pypy/interpreter/test/autopath.py
pypy/dist/pypy/lib/test2/autopath.py
pypy/dist/pypy/module/__builtin__/test/autopath.py
pypy/dist/pypy/module/_codecs/test/autopath.py
pypy/dist/pypy/module/_sre/test/autopath.py
pypy/dist/pypy/module/sys/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/rlib/autopath.py
pypy/dist/pypy/rlib/test/autopath.py
pypy/dist/pypy/rpython/rctypes/tool/autopath.py
pypy/dist/pypy/tool/algo/test/autopath.py
pypy/dist/pypy/tool/autopath.py
pypy/dist/pypy/tool/build/bin/autopath.py
pypy/dist/pypy/tool/pytest/autopath.py
pypy/dist/pypy/tool/test/autopath.py
pypy/dist/pypy/translator/asm/autopath.py
pypy/dist/pypy/translator/asm/ppcgen/autopath.py
pypy/dist/pypy/translator/asm/ppcgen/test/autopath.py
pypy/dist/pypy/translator/asm/test/autopath.py
pypy/dist/pypy/translator/autopath.py
pypy/dist/pypy/translator/c/autopath.py
pypy/dist/pypy/translator/c/test/autopath.py
pypy/dist/pypy/translator/cl/test/autopath.py
pypy/dist/pypy/translator/cli/test/autopath.py
pypy/dist/pypy/translator/goal/autopath.py
pypy/dist/pypy/translator/js/autopath.py
pypy/dist/pypy/translator/js/demo/jsdemo/autopath.py
pypy/dist/pypy/translator/js/examples/autopath.py
pypy/dist/pypy/translator/llvm/demo/autopath.py
pypy/dist/pypy/translator/llvm/pyllvm/autopath.py
pypy/dist/pypy/translator/microbench/pybench/autopath.py
pypy/dist/pypy/translator/pyrex/autopath.py
pypy/dist/pypy/translator/pyrex/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:
An autopath fix: avoid the getattr(mod, '__file__') if unneeded,
because it forces py lib modules to be loaded.
Modified: pypy/dist/pypy/annotation/test/autopath.py
==============================================================================
--- pypy/dist/pypy/annotation/test/autopath.py (original)
+++ pypy/dist/pypy/annotation/test/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/bin/autopath.py
==============================================================================
--- pypy/dist/pypy/bin/autopath.py (original)
+++ pypy/dist/pypy/bin/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/config/autopath.py
==============================================================================
--- pypy/dist/pypy/config/autopath.py (original)
+++ pypy/dist/pypy/config/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/interpreter/autopath.py
==============================================================================
--- pypy/dist/pypy/interpreter/autopath.py (original)
+++ pypy/dist/pypy/interpreter/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/interpreter/pyparser/test/autopath.py
==============================================================================
--- pypy/dist/pypy/interpreter/pyparser/test/autopath.py (original)
+++ pypy/dist/pypy/interpreter/pyparser/test/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/interpreter/test/autopath.py
==============================================================================
--- pypy/dist/pypy/interpreter/test/autopath.py (original)
+++ pypy/dist/pypy/interpreter/test/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/lib/test2/autopath.py
==============================================================================
--- pypy/dist/pypy/lib/test2/autopath.py (original)
+++ pypy/dist/pypy/lib/test2/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/module/__builtin__/test/autopath.py
==============================================================================
--- pypy/dist/pypy/module/__builtin__/test/autopath.py (original)
+++ pypy/dist/pypy/module/__builtin__/test/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/module/_codecs/test/autopath.py
==============================================================================
--- pypy/dist/pypy/module/_codecs/test/autopath.py (original)
+++ pypy/dist/pypy/module/_codecs/test/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/module/_sre/test/autopath.py
==============================================================================
--- pypy/dist/pypy/module/_sre/test/autopath.py (original)
+++ pypy/dist/pypy/module/_sre/test/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/module/sys/test/autopath.py
==============================================================================
--- pypy/dist/pypy/module/sys/test/autopath.py (original)
+++ pypy/dist/pypy/module/sys/test/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
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 Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/objspace/std/autopath.py
==============================================================================
--- pypy/dist/pypy/objspace/std/autopath.py (original)
+++ pypy/dist/pypy/objspace/std/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
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 Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/objspace/test/autopath.py
==============================================================================
--- pypy/dist/pypy/objspace/test/autopath.py (original)
+++ pypy/dist/pypy/objspace/test/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/rlib/autopath.py
==============================================================================
--- pypy/dist/pypy/rlib/autopath.py (original)
+++ pypy/dist/pypy/rlib/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/rlib/test/autopath.py
==============================================================================
--- pypy/dist/pypy/rlib/test/autopath.py (original)
+++ pypy/dist/pypy/rlib/test/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/rpython/rctypes/tool/autopath.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/tool/autopath.py (original)
+++ pypy/dist/pypy/rpython/rctypes/tool/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/tool/algo/test/autopath.py
==============================================================================
--- pypy/dist/pypy/tool/algo/test/autopath.py (original)
+++ pypy/dist/pypy/tool/algo/test/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/tool/autopath.py
==============================================================================
--- pypy/dist/pypy/tool/autopath.py (original)
+++ pypy/dist/pypy/tool/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/tool/build/bin/autopath.py
==============================================================================
--- pypy/dist/pypy/tool/build/bin/autopath.py (original)
+++ pypy/dist/pypy/tool/build/bin/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/tool/pytest/autopath.py
==============================================================================
--- pypy/dist/pypy/tool/pytest/autopath.py (original)
+++ pypy/dist/pypy/tool/pytest/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/tool/test/autopath.py
==============================================================================
--- pypy/dist/pypy/tool/test/autopath.py (original)
+++ pypy/dist/pypy/tool/test/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/translator/asm/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/asm/autopath.py (original)
+++ pypy/dist/pypy/translator/asm/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/translator/asm/ppcgen/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/asm/ppcgen/autopath.py (original)
+++ pypy/dist/pypy/translator/asm/ppcgen/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/translator/asm/ppcgen/test/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/asm/ppcgen/test/autopath.py (original)
+++ pypy/dist/pypy/translator/asm/ppcgen/test/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/translator/asm/test/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/asm/test/autopath.py (original)
+++ pypy/dist/pypy/translator/asm/test/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/translator/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/autopath.py (original)
+++ pypy/dist/pypy/translator/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/translator/c/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/c/autopath.py (original)
+++ pypy/dist/pypy/translator/c/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/translator/c/test/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/c/test/autopath.py (original)
+++ pypy/dist/pypy/translator/c/test/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/translator/cl/test/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/cl/test/autopath.py (original)
+++ pypy/dist/pypy/translator/cl/test/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/translator/cli/test/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/cli/test/autopath.py (original)
+++ pypy/dist/pypy/translator/cli/test/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/translator/goal/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/goal/autopath.py (original)
+++ pypy/dist/pypy/translator/goal/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/translator/js/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/js/autopath.py (original)
+++ pypy/dist/pypy/translator/js/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/translator/js/demo/jsdemo/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/js/demo/jsdemo/autopath.py (original)
+++ pypy/dist/pypy/translator/js/demo/jsdemo/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/translator/js/examples/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/js/examples/autopath.py (original)
+++ pypy/dist/pypy/translator/js/examples/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/translator/llvm/demo/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/demo/autopath.py (original)
+++ pypy/dist/pypy/translator/llvm/demo/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/translator/llvm/pyllvm/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/pyllvm/autopath.py (original)
+++ pypy/dist/pypy/translator/llvm/pyllvm/autopath.py Sun Nov 5 12:45:39 2006
@@ -41,15 +41,7 @@
else:
raise EnvironmentError, "'%s' missing in '%r'" % (partdir, this_dir)
- checkpaths = sys.path[:]
pypy_root = os.path.join(head, '')
-
- while checkpaths:
- orig = checkpaths.pop()
- 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)
try:
sys.path.remove(head)
except ValueError:
@@ -58,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/translator/microbench/pybench/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/microbench/pybench/autopath.py (original)
+++ pypy/dist/pypy/translator/microbench/pybench/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/translator/pyrex/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/pyrex/autopath.py (original)
+++ pypy/dist/pypy/translator/pyrex/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/translator/pyrex/test/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/pyrex/test/autopath.py (original)
+++ pypy/dist/pypy/translator/pyrex/test/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/translator/test/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/test/autopath.py (original)
+++ pypy/dist/pypy/translator/test/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
Modified: pypy/dist/pypy/translator/tool/autopath.py
==============================================================================
--- pypy/dist/pypy/translator/tool/autopath.py (original)
+++ pypy/dist/pypy/translator/tool/autopath.py Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
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 Sun Nov 5 12:45:39 2006
@@ -50,8 +50,10 @@
munged = {}
for name, mod in sys.modules.items():
+ if '.' in name:
+ continue
fn = getattr(mod, '__file__', None)
- if '.' in name or not isinstance(fn, str):
+ if not isinstance(fn, str):
continue
newname = os.path.splitext(os.path.basename(fn))[0]
if not newname.startswith(part + '.'):
More information about the pypy-svn
mailing list