[pypy-svn] r79135 - pypy/trunk/pypy/module/cpyext/test
afa at codespeak.net
afa at codespeak.net
Mon Nov 15 22:40:53 CET 2010
Author: afa
Date: Mon Nov 15 22:40:51 2010
New Revision: 79135
Modified:
pypy/trunk/pypy/module/cpyext/test/test_cpyext.py
Log:
Fix tests in cpyext module
Modified: pypy/trunk/pypy/module/cpyext/test/test_cpyext.py
==============================================================================
--- pypy/trunk/pypy/module/cpyext/test/test_cpyext.py (original)
+++ pypy/trunk/pypy/module/cpyext/test/test_cpyext.py Mon Nov 15 22:40:51 2010
@@ -42,7 +42,7 @@
raises(ImportError, cpyext.load_module, "missing.file", "foo")
raises(ImportError, cpyext.load_module, self.libc, "invalid.function")
-def compile_module(modname, **kwds):
+def compile_module(space, modname, **kwds):
"""
Build an extension module and return the filename of the resulting native
code file.
@@ -65,10 +65,8 @@
[], eci,
outputfilename=str(dirname/modname),
standalone=False)
- if sys.platform == 'win32':
- pydname = soname.new(purebasename=modname, ext='.pyd')
- else:
- pydname = soname.new(purebasename=modname, ext='.so')
+ from pypy.module.imp.importing import get_so_extension
+ pydname = soname.new(purebasename=modname, ext=get_so_extension(space))
soname.rename(pydname)
return str(pydname)
@@ -153,7 +151,7 @@
kwds["link_files"] = [str(api_library + '.so')]
if sys.platform == 'linux2':
kwds["compile_extra"]=["-Werror=implicit-function-declaration"]
- return compile_module(name, **kwds)
+ return compile_module(self.space, name, **kwds)
def import_module(self, name, init=None, body='', load_it=True, filename=None):
More information about the Pypy-commit
mailing list