import os import platform import setuptools # Minimal dependencies required to test immutables. TEST_DEPENDENCIES = [ # pycodestyle is a dependency of flake8, but it must be frozen because # their combination breaks too often # (example breakage: https://gitlab.com/pycqa/flake8/issues/427) 'flake8~=3.8.4', 'pycodestyle~=2.6.0', 'mypy==0.942', 'pytest~=6.2.4', ] EXTRA_DEPENDENCIES = { 'test': TEST_DEPENDENCIES, } CFLAGS = ['-O2'] if platform.uname().system != 'Windows': CFLAGS.extend(['-std=c99', '-fsigned-char', '-Wall', '-Wsign-compare', '-Wconversion']) with open(os.path.join( os.path.dirname(__file__), 'immutables', '_version.py')) as f: for line in f: if line.startswith('__version__ ='): _, _, version = line.partition('=') VERSION = version.strip(" \n'\"") break else: raise RuntimeError( 'unable to read the version from immutables/_version.py') if platform.python_implementation() == 'CPython': if os.environ.get("DEBUG_IMMUTABLES") == '1': define_macros = [] undef_macros = ['NDEBUG'] else: define_macros = [('NDEBUG', '1')] undef_macros = [] ext_module
aboutsummaryrefslogtreecommitdiff
path: root/design/