diff --git a/setup.py b/setup.py index 3eb382db..f5d174da 100644 --- a/setup.py +++ b/setup.py @@ -5,6 +5,15 @@ SOURCE_FILES = [os.path.join('http-parser', 'http_parser.c')] + \ sorted(glob.glob(os.path.join('bjoern', '*.c'))) +_DEBUG = False +if _DEBUG: + extra_compile_args = ['-std=c99', '-fno-strict-aliasing', '-fcommon', + '-fPIC', '-Wall', '-Wextra', '-Wno-unused-parameter', + '-Wno-missing-field-initializers', '-g'] +else: + extra_compile_args = ['-std=c99', '-fno-strict-aliasing', '-fcommon', + '-fPIC', '-Wall', '-g'] + bjoern_extension = Extension( '_bjoern', sources = SOURCE_FILES, @@ -12,9 +21,7 @@ include_dirs = ['http-parser', '/usr/include/libev'], define_macros = [('WANT_SENDFILE', '1'), ('WANT_SIGINT_HANDLING', '1')], - extra_compile_args = ['-std=c99', '-fno-strict-aliasing', '-fcommon', - '-fPIC', '-Wall', '-Wextra', '-Wno-unused-parameter', - '-Wno-missing-field-initializers', '-g'] + extra_compile_args=extra_compile_args ) setup(