Skip to content

Commit 6cbaff5

Browse files
committed
Build limited C API without Py_TRACE_REFS macro.
1 parent b2a91e0 commit 6cbaff5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1864,9 +1864,10 @@ def detect_modules(self):
18641864
## # Uncomment these lines if you want to play with xxmodule.c
18651865
## self.add(Extension('xx', ['xxmodule.c']))
18661866

1867-
# Limited C API
1868-
self.add(Extension('xxlimited', ['xxlimited.c']))
1869-
self.add(Extension('xxlimited_35', ['xxlimited_35.c']))
1867+
# Build limited C API without Py_TRACE_REFS macro
1868+
if not sysconfig.get_config_var('Py_TRACE_REFS'):
1869+
self.add(Extension('xxlimited', ['xxlimited.c']))
1870+
self.add(Extension('xxlimited_35', ['xxlimited_35.c']))
18701871

18711872
def detect_tkinter_fromenv(self):
18721873
# Build _tkinter using the Tcl/Tk locations specified by

0 commit comments

Comments
 (0)