[Distutils] Proposal: C/C++ compiler identification

John Skaller skaller@maxtal.com.au
Wed, 16 Dec 1998 06:38:34 +1000

At 10:36 15/12/98 -0500, Greg Ward wrote:
>*This is not a flame*  Please do not interpret it as such!
>Quoth John Skaller, on 13 December 1998:
>> This proposal is intended as a detail of the general requrements
>> document for distutils.

>So, first question: are you proposing to throw out my requirements
>document and replace it with this?  Or are you suggesting
>additions/modifications to mine?

        An addition. I though that was clear by describing
it as a detail. I'm proposing that, under one of your
headings, to add a subheading. OK?

>Next, you speak of the "Python build process" creating "run time
>accessible identification data".  The first phrase gives me the
>impression that you're talking about building Python itself (and its
>library), which really isn't the province of the distutils suite.  

        Yes, I AM taking about building Python itself.
Sigh. It it that hard to understand: when python is built,
it know the name of the compiler.

        I want a module:

        import build_compiler
        cc = build_compiler.cc

which is the name of the compiler used to build Python,
so I can invoke that same compiler to build an extension.
And all the other info needed, such as where various
libraries are, what -DMACRO options are needed, etc,

(If this SIG produces usable code soon enough, Guido might find it useful to 
>rework how the standard library is built for Python 1.6.  That's the
>only connection I see between the two.)

        Then you are missing the link: the build processes
know how to build C.

        I want the build process to put that
information into a standard module. So I can get it out,
and call up the compiler to make a C extension FROM PYTHON.

>I have no idea what you mean by "run time accessible identification
>data".  Or rather, I can think of a half-dozen things you might mean.
>Please explain, or rephrase in a more conventional way.

        have I explained now?

        This is the key problem for distutils BECAUSE it
REQUIRES Guido to modify the build process to create 
the information needed to call up the compiler
from python script. At least, this is by far the most
reliable way to get the information: all that autoconfig
and makefile and setup stuff has the information,
and it is needed to be able to build C code later as well.

        That is the connection. Distutils cannot work
if Guido doesn't give the information. 

        SOME of the information is already available
in some form: the name of the compiler is already
encoded in the version string. But it isn't
enough to actually emulate the compilation and linkage
processes the same way Setup builds things.
John Skaller    email: skaller@maxtal.com.au
		phone: 61-2-96600850
		snail: 10/1 Toxteth Rd, Glebe NSW 2037, Australia