How may I override the compiler (gcc) flags that setup.py uses by default?
问题 I understand that setup.py uses the same CFLAGS that were used to build python. I have a single C extension of ours that is segfaulting. I need to build it without -O2 because -O2 is optimizing out some values and code so that the core files are not sufficient to pin down the problem. I just need to modify setup.py so that -O2 is not used. I\'ve read distutils documentation, in particular distutils.ccompiler and distutils.unixcompiler and see how to add flags and libs and includes, but not