[Distutils] Compiler abstractiom model

Greg Ward gward@cnri.reston.va.us
Wed, 31 Mar 1999 14:02:50 -0500


Quoth Mark Hammond, on 31 March 1999:
> Building from what Greg said, I agree that _certain_ command-line
> params can be mandated - they are designed not to be
> configurable, as messing them will likely break the build.  But
> there also needs to be a secondary class that are virtually
> unconstrained.

I think there will have to be some way to accomodate platform
dependencies in a Distutils build.  Eg. Win32 extensions are allowed to
compile only on Win32, and from what I'm hearing it sounds as though
lots of Windows-specific compiler options might need to be snuck in to
build a given extension.  Or I might want my extension to be built with
-O2 as long as gcc is the compiler, no matter how Python was built.
Ultimately, this means that you will be free to stick "-n32" into your
compiler command line if you're on an SGI and using SGI's compiler, even
though this will most likely break things.  Partly this is a
documentation/social engineering thing, but it can also be addressed by
making the compiler options that can (and sometimes must) be set in a
portable way part of the compiler abstraction model -- hence the idea of
a "compiler.debug" flag, which will control the "-g" switch on Unix C
compilers and the local equivalent elsewhere.

> [Sorry - as usual, speaking having kept only a quick eye on the
> posts, and not having seen the latest code drop...]

That's quite all right -- just scatter enough droplets of knowledge,
I'll filter through the ones that aren't relevant to the code.

        Greg
-- 
Greg Ward - software developer                    gward@cnri.reston.va.us
Corporation for National Research Initiatives    
1895 Preston White Drive                      voice: +1-703-620-8990 x287
Reston, Virginia, USA  20191-5434               fax: +1-703-620-0913