[Distutils] Distutils.sysconfig.customize_compiler wrong ?

Tarek Ziadé ziade.tarek at gmail.com
Fri May 22 16:13:23 CEST 2009

On Fri, May 22, 2009 at 4:07 PM, rupert.thurner
<rupert.thurner at gmail.com> wrote:
> On May 22, 3:41 pm, Tarek Ziadé <ziade.ta... at gmail.com> wrote:
>> On Fri, May 22, 2009 at 3:36 PM, rupert.thurner
>> <rupert.thur... at gmail.com> wrote:
>> > are you sure you are not violating something here?
>> What do you mean ?
> the "This function is even more special-purpose, and should only be
> used
> from Python’s own build procedures. "

As a matter of fact, Python uses build_ext when it's built.  What the
documentation means
here is that you should not use customize_compiler in your code, but
through build_ext
and a few other commands in Python's distutils.

I agree it's not very clear though, and that it should be made private
with a "_"

>> > the packager of our operating systems python had the compiler in /opt/
>> > studio/... but we do not.
>> build_ext will pick the CC it finds in the Makefile but overrides it if one
>> is set in os.environ['CC']
> i cannot find it in the code ... but it seems to work on the top level
> but is not passed on, so i wonder where in the code this is ?

It's in distutils code, not setuptools. Setuptools is a layer on the
top of distutils.

More information about the Distutils-SIG mailing list