[pypy-commit] pypy default: fix c-extension suffix generation for applevel tests

mattip pypy.commits at gmail.com
Thu Jul 21 22:12:18 EDT 2016


Author: mattip <matti.picus at gmail.com>
Branch: 
Changeset: r85796:fb15f7cd83fa
Date: 2016-07-22 05:11 -0500
http://bitbucket.org/pypy/pypy/changeset/fb15f7cd83fa/

Log:	fix c-extension suffix generation for applevel tests

diff --git a/pypy/module/cpyext/test/test_cpyext.py b/pypy/module/cpyext/test/test_cpyext.py
--- a/pypy/module/cpyext/test/test_cpyext.py
+++ b/pypy/module/cpyext/test/test_cpyext.py
@@ -126,7 +126,14 @@
             source_strings=source_strings,
             compile_extra=compile_extra,
             link_extra=link_extra)
-    return str(soname)
+    from imp import get_suffixes, C_EXTENSION
+    pydname = soname
+    for suffix, mode, typ in get_suffixes():
+        if typ == C_EXTENSION:
+            pydname = soname.new(purebasename=modname, ext=suffix)
+            soname.rename(pydname)
+            break
+    return str(pydname)
 
 def freeze_refcnts(self):
     rawrefcount._dont_free_any_more()


More information about the pypy-commit mailing list