mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-42111: Make the xxlimited module an example of best extension module practices (GH-23226)
- Copy existing xxlimited to xxlimited53 (named for the limited API version it uses) - Build both modules, both in debug and release - Test both modules
This commit is contained in:
parent
4aa67853cc
commit
c168b5078f
11 changed files with 745 additions and 155 deletions
8
setup.py
8
setup.py
|
@ -1803,8 +1803,16 @@ class PyBuildExt(build_ext):
|
|||
## self.add(Extension('xx', ['xxmodule.c']))
|
||||
|
||||
if 'd' not in sysconfig.get_config_var('ABIFLAGS'):
|
||||
# Non-debug mode: Build xxlimited with limited API
|
||||
self.add(Extension('xxlimited', ['xxlimited.c'],
|
||||
define_macros=[('Py_LIMITED_API', '0x03100000')]))
|
||||
self.add(Extension('xxlimited_35', ['xxlimited_35.c'],
|
||||
define_macros=[('Py_LIMITED_API', '0x03050000')]))
|
||||
else:
|
||||
# Debug mode: Build xxlimited with the full API
|
||||
# (which is compatible with the limited one)
|
||||
self.add(Extension('xxlimited', ['xxlimited.c']))
|
||||
self.add(Extension('xxlimited_35', ['xxlimited_35.c']))
|
||||
|
||||
def detect_tkinter_explicitly(self):
|
||||
# Build _tkinter using explicit locations for Tcl/Tk.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue