Description: Expose SOABI in sysconfig
 So that dh_pypy can use it to generate useful dependencies.
Author: Stefano Rivera <stefanor@debian.org>
Last-Update: 2015-11-01
Bug-Debian: https://bugs.debian.org/803689

--- a/lib-python/2.7/sysconfig.py
+++ b/lib-python/2.7/sysconfig.py
@@ -524,6 +524,13 @@
             import _osx_support
             _osx_support.customize_config_vars(_CONFIG_VARS)
 
+        # PyPy:
+        import imp
+        for suffix, mode, type_ in imp.get_suffixes():
+            if type_ == imp.C_EXTENSION:
+                _CONFIG_VARS['SOABI'] = suffix.split('.')[1]
+                break
+
     if args:
         vals = []
         for name in args:
