[pypy-svn] r79138 - in pypy/trunk/pypy/module/imp: . test
afa at codespeak.net
afa at codespeak.net
Tue Nov 16 02:17:36 CET 2010
Author: afa
Date: Tue Nov 16 02:17:34 2010
New Revision: 79138
Modified:
pypy/trunk/pypy/module/imp/importing.py
pypy/trunk/pypy/module/imp/test/test_import.py
Log:
When running an interpreter pypy (bin/py.py),
add 'i' to the soabi tag.
presetup.py will use it
Modified: pypy/trunk/pypy/module/imp/importing.py
==============================================================================
--- pypy/trunk/pypy/module/imp/importing.py (original)
+++ pypy/trunk/pypy/module/imp/importing.py Tue Nov 16 02:17:34 2010
@@ -37,11 +37,15 @@
soabi = space.config.objspace.soabi
else:
soabi = DEFAULT_SOABI
- if soabi:
- return '.' + soabi + SO
- else:
+
+ if not soabi:
return SO
+ if not space.config.translating:
+ soabi += 'i'
+
+ return '.' + soabi + SO
+
def find_modtype(space, filepart):
"""Check which kind of module to import for the given filepart,
which is a path without extension. Returns PY_SOURCE, PY_COMPILED or
Modified: pypy/trunk/pypy/module/imp/test/test_import.py
==============================================================================
--- pypy/trunk/pypy/module/imp/test/test_import.py (original)
+++ pypy/trunk/pypy/module/imp/test/test_import.py Tue Nov 16 02:17:34 2010
@@ -478,10 +478,10 @@
space1 = gettestobjspace(soabi='TEST')
space2 = gettestobjspace(soabi='')
if sys.platform == 'win32':
- assert importing.get_so_extension(space1) == '.TEST.pyd'
+ assert importing.get_so_extension(space1) == '.TESTi.pyd'
assert importing.get_so_extension(space2) == '.pyd'
else:
- assert importing.get_so_extension(space1) == '.TEST.so'
+ assert importing.get_so_extension(space1) == '.TESTi.so'
assert importing.get_so_extension(space2) == '.so'
def _getlong(data):
More information about the Pypy-commit
mailing list