[Distutils] compiler-specific extra_compiler_args

Giovanni Bajo rasky at develer.com
Fri Oct 24 18:00:03 CEST 2008


using vanilla distutils with vanilla Python 2.5, I would like to pass 
different extra_compiler_args to the setup() call based on the compiler 
I'm using.

In fact, if I'm using GCC (whether on Windows, Linux or Mac), I have a 
few options to specify; if I'm using MSVC (on Windows), I have others.

This looks like a basic need, but I couldn't find a way to achieve it. 
Most existing scripts in the wild seem to simply do a check on the 
platform, which neglects the fact that one can specify 
--compiler=mingw32 to use GCC MinGW to build on Windows.

Any suggestion on how to achieve this?
Giovanni Bajo
Develer S.r.l.

More information about the Distutils-SIG mailing list