aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/build_ext.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/command/build_ext.py')
-rw-r--r--setuptools/command/build_ext.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py
index 66ed285e..36f53f0d 100644
--- a/setuptools/command/build_ext.py
+++ b/setuptools/command/build_ext.py
@@ -109,7 +109,7 @@ class build_ext(_build_ext):
and get_abi3_suffix()
)
if use_abi3:
- so_ext = get_config_var('EXT_SUFFIX') or get_config_var('SO')
+ so_ext = _get_config_var_837('EXT_SUFFIX')
filename = filename[:-len(so_ext)]
filename = filename + get_abi3_suffix()
if isinstance(ext, Library):
@@ -316,3 +316,13 @@ else:
self.create_static_lib(
objects, basename, output_dir, debug, target_lang
)
+
+
+def _get_config_var_837(name):
+ """
+ In https://github.com/pypa/setuptools/pull/837, we discovered
+ Python 3.3.0 exposes the extension suffix under the name 'SO'.
+ """
+ if sys.version_info < (3, 3, 1):
+ name = 'SO'
+ return get_config_var(name)