[pypy-commit] cffi default: Fix when running on pypy without cpyext.

arigo noreply at buildbot.pypy.org
Thu Feb 7 23:22:18 CET 2013


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r1128:a8bdd46c8afb
Date: 2013-02-07 23:22 +0100
http://bitbucket.org/cffi/cffi/changeset/a8bdd46c8afb/

Log:	Fix when running on pypy without cpyext.

diff --git a/cffi/verifier.py b/cffi/verifier.py
--- a/cffi/verifier.py
+++ b/cffi/verifier.py
@@ -223,7 +223,11 @@
     for suffix, mode, type in imp.get_suffixes():
         if type == imp.C_EXTENSION:
             return suffix
-    raise ffiplatform.VerificationError("no C_EXTENSION available")
+    # bah, no C_EXTENSION available.  Occurs on pypy without cpyext
+    if sys.platform == 'win32':
+        return ".pyd"
+    else:
+        return ".so"
 
 def _ensure_dir(filename):
     try:


More information about the pypy-commit mailing list