diff options
author | Yury Selivanov <yury@edgedb.com> | 2020-04-22 17:03:48 -0700 |
---|---|---|
committer | Yury Selivanov <yury@edgedb.com> | 2020-04-22 17:03:48 -0700 |
commit | d107c3ea800d206ef890cafa81a8520aa29c5eb1 (patch) | |
tree | 0e2a5029a5e0bf0e06f941aba9cb9b364a3e6e75 /setup.py | |
parent | ad137a3b4900a3cec1b2a46888f70612dff18370 (diff) | |
download | immutables-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.py | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 = [] |