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): ...@@ -104,7 +104,9 @@ class build_ext(_build_ext):
filename = _build_ext.get_ext_filename(self, fullname) filename = _build_ext.get_ext_filename(self, fullname)
if fullname in self.ext_map: if fullname in self.ext_map:
ext = self.ext_map[fullname] 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 from distutils.sysconfig import get_config_var
so_ext = get_config_var('SO') so_ext = get_config_var('SO')
filename = filename[:-len(so_ext)] filename = filename[:-len(so_ext)]
......
...@@ -36,8 +36,8 @@ have_pyrex = _have_cython ...@@ -36,8 +36,8 @@ have_pyrex = _have_cython
class Extension(_Extension): class Extension(_Extension):
"""Extension that uses '.c' files in place of '.pyx' files""" """Extension that uses '.c' files in place of '.pyx' files"""
def __init__(self, name, sources, is_abi3=False, **kw): def __init__(self, name, sources, py_limited_api=False, **kw):
self.is_abi3 = is_abi3 self.py_limited_api = py_limited_api
_Extension.__init__(self, name, sources, **kw) _Extension.__init__(self, name, sources, **kw)
def _convert_pyx_sources_to_lang(self): def _convert_pyx_sources_to_lang(self):
......
...@@ -28,7 +28,7 @@ class TestBuildExt: ...@@ -28,7 +28,7 @@ class TestBuildExt:
""" """
print(get_abi3_suffix()) 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])) dist = Distribution(dict(ext_modules=[extension]))
cmd = build_ext(dist) cmd = build_ext(dist)
cmd.finalize_options() 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