summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--siputils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/siputils.py b/siputils.py
index e17518d..6abc6b1 100644
--- a/siputils.py
+++ b/siputils.py
@@ -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")