Author: Stefano Rivera <[email protected]>
Branch: 
Changeset: r2611:a3f2aad89ff0
Date: 2016-01-17 12:52 -0800
http://bitbucket.org/cffi/cffi/changeset/a3f2aad89ff0/

Log:    Don't hardcode _d. If that is the extension, it'll be in sysconfig

diff --git a/cffi/api.py b/cffi/api.py
--- a/cffi/api.py
+++ b/cffi/api.py
@@ -1,4 +1,4 @@
-import sys, types
+import sys, sysconfig, types
 from .lock import allocate_lock
 
 try:
@@ -557,16 +557,14 @@
         else:
             if sys.platform == "win32":
                 template = "python%d%d"
-                if sys.flags.debug:
-                    template = template + '_d'
             else:
                 template = "python%d.%d"
             pythonlib = (template %
                     (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
             if hasattr(sys, 'abiflags'):
                 pythonlib += sys.abiflags
-            elif hasattr(sys, 'gettotalrefcount'):
-                pythonlib += '_d'
+            elif sysconfig.get_config_var('DEBUG_EXT'):
+                pythonlib += sysconfig.get_config_var('DEBUG_EXT')
         ensure('libraries', pythonlib)
         if sys.platform == "win32":
             ensure('extra_link_args', '/MANIFEST')
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to