compiling...

Anders J. Munch andersjm at inbound.dk
Mon Feb 3 15:54:31 EST 2003


"Alex Martelli" <aleax at aleax.it> wrote:
> Anders J. Munch wrote:
>
> > "Chris Gonnerman" <chris.gonnerman at newcenturycomputers.net> wrote:
> >> You don't have a Microsoft C compiler.  The distutils
> >> (invoked by the setup.py you mention) by default
> >> assume you are using MS Visual C.
> >
> > Strange assumption.
> >
> > 'in-the-face-of-ambiguity'-well-you-know-the-rest-ly y'rs, Anders
>
> If this is a criticism of the distutils' design choice, I
> want to express my disagreement with it.  The distutils
> default to the same compiler that is used to build the
> standard Python distribution on a Windows platform: this
> seems to me to be exactly the right default.

That makes it the right choice when choosing between available
compilers.  For a source distribution it's also reasonable to assume
that the compiler used to build the interpreter is available which
makes it a good default.  For a binary distribution assuming that the
build compiler is available is - guessing.

The MSVC version is designed to be a binary distribution.  That shows
through MSVC compiler options being hardwired into distutils, unlike
the unix variation, where as far as I can see options are remembered
from the build.

>
> Calling it an "assumption" may be misleading.  But call it
> a "default" and it makes more sense, no?-)

I call it a default borne out of an assumption.  Same difference :-)

Not a big deal, distutils is great and a good guesser;-).  It just
struck me that the OPs problems were caused by distutils failing to
observe one of Tim's theses.  Perhaps you feel that in this specific
case a little guesswork is warranted, if so fine with me, but it would
have been a perfectly fine alternative for distutils to print an
informative message instead.

- Anders







More information about the Python-list mailing list