From a87786c7706bc1d00f6bfe0359b969434ac084e5 Mon Sep 17 00:00:00 2001 From: Max Bachmann Date: Sat, 21 Aug 2021 03:51:08 +0200 Subject: [PATCH] disable assertions in release build --- setup.py | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/setup.py b/setup.py index f442c1d..ba65b1b 100644 --- a/setup.py +++ b/setup.py @@ -5,23 +5,8 @@ import sys class BuildExt(build_ext): """A custom build extension for adding compiler-specific options.""" c_opts = { - 'msvc': ['/EHsc', '/O2', '/std:c++11', '/W4', - # disable some warnings from the Cython code - #'/wd4127', # conditional expression is constant - #'/wd4100', # '__pyx_self': unreferenced formal parameter - #'/wd4505', # unreferenced local function has been removed - #'/wd4125', # decimal digit terminates octal escape sequence - #'/wd4310', # cast truncates constant value - ], - 'unix': ['-O3', '-std=c++11', - '-Wextra', '-Wall', '-Wconversion', '-g0', - #'-Wno-deprecated-declarations', - # the xcode implementation used in the CI has a bug, which causes - # this to be thrown even when it is ignored using brackets around the statement - #'-Wno-unreachable-code', - # this caused issues on the conda forge build - #'-Wno-unused-command-line-argument' - ], + 'msvc': ['/EHsc', '/O2', '/std:c++11', '/W4', '/DNDEBUG'], + 'unix': ['-O3', '-std=c++11', '-Wextra', '-Wall', '-Wconversion', '-g0', '-DNDEBUG'], } l_opts = { 'msvc': [], @@ -46,7 +31,6 @@ class BuildExt(build_ext): ext.extra_link_args += link_opts build_ext.build_extensions(self) - ext_modules = [ Extension( name='rapidfuzz.cpp_process',