Automatically add build definition Py_DEBUG, when building module for debug build of Python.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/11/head
Slávek Banko 1 year ago
parent b92a3b0a4e
commit 1d30924b9d
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -856,6 +856,13 @@ class Makefile:
cppflags = []
if getattr(sys, "pydebug", False):
cppflags.append("-DPy_DEBUG")
if hasattr(sys, "abiflags"):
if 'd' in sys.abiflags:
cppflags.append("-DPy_DEBUG")
if not self._debug:
cppflags.append("-DNDEBUG")

Loading…
Cancel
Save