Commit 702a4277 authored by Daniel Holth's avatar Daniel Holth

rename is_abi3 to py_limited_api

parent dab253cb
......@@ -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)]
......
......@@ -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):
......
......@@ -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()
......
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