-
Prepend
CFLAGS="-O0"
before you runsetup.py
:% CFLAGS="-O0" python ./setup.py
The
-O0
will be appended toCFLAGS
while compiling, therefore will override previous-O2
setting. -
Another way is add
-O0
toextra_compile_args
insetup.py
:moduleA = Extension('moduleA', ....., include_dirs = ['/usr/include', '/usr/local/include'], extra_compile_args = ["-O0"], )
-
If you want to remove all default flags, use:
% OPT="" python ./setup.py