aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Holth <dholth@fastmail.fm>2016-08-05 07:55:57 -0400
committerDaniel Holth <dholth@fastmail.fm>2016-08-05 07:55:57 -0400
commit702a4277768f0781e3d0a4cf770d29621f7f2cc3 (patch)
treee6a6745b76b741ec8963d38f962e3d0073a6177e
parentdab253cb72eb7c098393f985e32585e079607f66 (diff)
downloadexternal_python_setuptools-702a4277768f0781e3d0a4cf770d29621f7f2cc3.tar.gz
external_python_setuptools-702a4277768f0781e3d0a4cf770d29621f7f2cc3.tar.bz2
external_python_setuptools-702a4277768f0781e3d0a4cf770d29621f7f2cc3.zip
rename is_abi3 to py_limited_api
-rw-r--r--setuptools/command/build_ext.py4
-rw-r--r--setuptools/extension.py4
-rw-r--r--setuptools/tests/test_build_ext.py2
3 files changed, 6 insertions, 4 deletions
diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py
index dad28999..7bb4d24c 100644
--- a/setuptools/command/build_ext.py
+++ b/setuptools/command/build_ext.py
@@ -104,7 +104,9 @@ class build_ext(_build_ext):
filename = _build_ext.get_ext_filename(self, fullname)
if fullname in self.ext_map:
ext = self.ext_map[fullname]
- if sys.version_info[0] != 2 and getattr(ext, 'is_abi3'):
+ if (sys.version_info[0] != 2
+ and getattr(ext, 'py_limited_api')
+ and get_abi3_suffix()):
from distutils.sysconfig import get_config_var
so_ext = get_config_var('SO')
filename = filename[:-len(so_ext)]
diff --git a/setuptools/extension.py b/setuptools/extension.py
index a6cc0915..c8e9bc7d 100644
--- a/setuptools/extension.py
+++ b/setuptools/extension.py
@@ -36,8 +36,8 @@ have_pyrex = _have_cython
class Extension(_Extension):
"""Extension that uses '.c' files in place of '.pyx' files"""
- def __init__(self, name, sources, is_abi3=False, **kw):
- self.is_abi3 = is_abi3
+ def __init__(self, name, sources, py_limited_api=False, **kw):
+ self.py_limited_api = py_limited_api
_Extension.__init__(self, name, sources, **kw)
def _convert_pyx_sources_to_lang(self):
diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py
index c71aadca..100869f6 100644
--- a/setuptools/tests/test_build_ext.py
+++ b/setuptools/tests/test_build_ext.py
@@ -28,7 +28,7 @@ class TestBuildExt:
"""
print(get_abi3_suffix())
- extension = Extension('spam.eggs', ['eggs.c'], is_abi3=True)
+ extension = Extension('spam.eggs', ['eggs.c'], py_limited_api=True)
dist = Distribution(dict(ext_modules=[extension]))
cmd = build_ext(dist)
cmd.finalize_options()