Commit 9e50e2e2 authored by Jason R. Coombs's avatar Jason R. Coombs

Extract a helper to capture the temporary workaround. Ref #837.

parent 9fe9bb25
...@@ -109,7 +109,7 @@ class build_ext(_build_ext): ...@@ -109,7 +109,7 @@ class build_ext(_build_ext):
and get_abi3_suffix() and get_abi3_suffix()
) )
if use_abi3: 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[:-len(so_ext)]
filename = filename + get_abi3_suffix() filename = filename + get_abi3_suffix()
if isinstance(ext, Library): if isinstance(ext, Library):
...@@ -316,3 +316,13 @@ else: ...@@ -316,3 +316,13 @@ else:
self.create_static_lib( self.create_static_lib(
objects, basename, output_dir, debug, target_lang 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)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment