From: Hai Shi Date: Tue, 6 Apr 2021 12:55:13 +0000 (+0800) Subject: bpo-41111: Don't build xxlimited with Py_TRACE_REFS macro (GH-25180) X-Git-Tag: v3.10.0b1~393 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5787ba4a45492e232f5470c7d2e93763198e4b22;p=thirdparty%2FPython%2Fcpython.git bpo-41111: Don't build xxlimited with Py_TRACE_REFS macro (GH-25180) --- diff --git a/setup.py b/setup.py index edf3cb4f230b..d01193627949 100644 --- a/setup.py +++ b/setup.py @@ -1864,9 +1864,10 @@ class PyBuildExt(build_ext): ## # Uncomment these lines if you want to play with xxmodule.c ## self.add(Extension('xx', ['xxmodule.c'])) - # Limited C API - self.add(Extension('xxlimited', ['xxlimited.c'])) - self.add(Extension('xxlimited_35', ['xxlimited_35.c'])) + # The limited C API is not compatible with the Py_TRACE_REFS macro. + if not sysconfig.get_config_var('Py_TRACE_REFS'): + self.add(Extension('xxlimited', ['xxlimited.c'])) + self.add(Extension('xxlimited_35', ['xxlimited_35.c'])) def detect_tkinter_fromenv(self): # Build _tkinter using the Tcl/Tk locations specified by