diff options
| author | Johannes Reiff <mail@jreiff.de> | 2020-01-25 14:17:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-25 14:17:40 +0100 |
| commit | 6ee1a1ce60c6d039c63def3c2aeba7e0f39e7507 (patch) | |
| tree | 254243b04be614ee4ea346ccb7c25fb9deb11f5f /setuptools/command/build_ext.py | |
| parent | ec270f9e13fcc32a2a861273219ebfeba17838df (diff) | |
| parent | 73376585065bbf28395c71fe15137c19a712d4f3 (diff) | |
| download | python-setuptools-git-6ee1a1ce60c6d039c63def3c2aeba7e0f39e7507.tar.gz | |
Merge branch 'master' into pr-easyinstall
Diffstat (limited to 'setuptools/command/build_ext.py')
| -rw-r--r-- | setuptools/command/build_ext.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index daa8e4fe..03b6f346 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -14,7 +14,8 @@ from setuptools.extern import six if six.PY2: import imp - EXTENSION_SUFFIXES = [s for s, _, tp in imp.get_suffixes() if tp == imp.C_EXTENSION] + EXTENSION_SUFFIXES = [ + s for s, _, tp in imp.get_suffixes() if tp == imp.C_EXTENSION] else: from importlib.machinery import EXTENSION_SUFFIXES @@ -29,7 +30,7 @@ except ImportError: # make sure _config_vars is initialized get_config_var("LDSHARED") -from distutils.sysconfig import _config_vars as _CONFIG_VARS +from distutils.sysconfig import _config_vars as _CONFIG_VARS # noqa def _customize_compiler_for_shlib(compiler): @@ -65,7 +66,9 @@ elif os.name != 'nt': except ImportError: pass -if_dl = lambda s: s if have_rtld else '' + +def if_dl(s): + return s if have_rtld else '' def get_abi3_suffix(): @@ -113,7 +116,7 @@ class build_ext(_build_ext): if fullname in self.ext_map: ext = self.ext_map[fullname] use_abi3 = ( - six.PY3 + not six.PY2 and getattr(ext, 'py_limited_api') and get_abi3_suffix() ) |
