[Distutils] setup.py demo.C build (gcc vs. g++) (distutils)

Phillip J. Eby pje at telecommunity.com
Wed May 16 18:23:31 CEST 2007


At 09:56 PM 5/15/2007 -0500, Mowry, Peter wrote:
>set CC="g++"
>set CC=g++
>Neither of these work :-(

I may have misspoken; it may be the CXX variable you need to set, 
rather than CC.


>I also tried:
>python2.5 setup.py demo.C build --compiler=g++
>
>python2.5 setup.py demo.C build --help-compiler
>gives bcpp, cygwin, emx, mingw32, msvc, mwerks, unix (g++ is not an
>option)

That's because those are compiler *types*, not executables.  To 
override the executables, you need to use environment variables like 
CC, CPP, CXX, CCSHARED, LDSHARED, etc.  See the 
"customize_compiler()" function in the "distutils.sysconfig" module, 
as that's what sets the executable names that will be invoked.



More information about the Distutils-SIG mailing list