Use EXT_SUFFIX if defined instead of SO as SO is deprecated.
@@ -34,6 +34,10 @@ try:
import distutils.sysconfig
_py_soabi = sysconfig.get_config_var('SOABI')
+
+ _py_soext = sysconfig.get_config_var('EXT_SUFFIX')
+
+ if _py_soext is None:
_py_soext = sysconfig.get_config_var('SO')
if (sysconfig.get_config_var('WITH_DYLD') and
