summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorYury Selivanov <yury@edgedb.com>2020-04-22 17:03:48 -0700
committerYury Selivanov <yury@edgedb.com>2020-04-22 17:03:48 -0700
commitd107c3ea800d206ef890cafa81a8520aa29c5eb1 (patch)
tree0e2a5029a5e0bf0e06f941aba9cb9b364a3e6e75 /setup.py
parentad137a3b4900a3cec1b2a46888f70612dff18370 (diff)
downloadimmutables-d107c3ea800d206ef890cafa81a8520aa29c5eb1.tar.gz
immutables-d107c3ea800d206ef890cafa81a8520aa29c5eb1.zip
A bunch of fixes
* Fix #26: `ifdef NDEBUG` should be `ifndef NDEBUG` * More tests for #24 * Add a `DEBUG_IMMUTABLES` env var to build debug builds
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index e27586c..3749742 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,4 @@
-import os.path
+import os
import platform
import setuptools
@@ -22,11 +22,17 @@ with open(os.path.join(
if platform.python_implementation() == 'CPython':
+ if os.environ.get("DEBUG_IMMUTABLES") == '1':
+ undef_macros = ["NDEBUG"]
+ else:
+ undef_macros = None
+
ext_modules = [
setuptools.Extension(
"immutables._map",
["immutables/_map.c"],
- extra_compile_args=CFLAGS)
+ extra_compile_args=CFLAGS,
+ undef_macros=undef_macros)
]
else:
ext_modules = []