[Distutils] Access to Python config info

John Skaller skaller@maxtal.com.au
Sun, 20 Dec 1998 04:17:00 +1000


At 17:20 16/12/98 +0100, M.-A. Lemburg wrote:
>Greg Ward wrote:
>> 
>> On the superficial front, Marc-Andre hasn't convinced me that sysconfig
>> is a better name than sys.config.  

>So the reasons I renamed it from sys.config to sysconfig were simply:

        I think I favour this, but not strongly.

>> No!  At least not in the long term: as Greg Stein pointed out, the
>> config module (whatever it gets called) should just be generated when
>> Python is built.  Or were you talking about the near term, where we will
>> need a distutils release that works with Python 1.5.2 and is allowed all
>> manner of grotesque hackery to work around the lack of a config module,
>> such as digging up and parsing Python's config.h, Makefile, and Setup?
>
>I wouldn't consider this grotesque hackery. 

        I would. But it doesn't matter. What matters is not
how it is implemented, but the interface it is required to have.
(Where 'interface' includes semantics)

        The principal task of this effort is _not_ implementation
but standardisation.

>The parsed information could then be stored in a _sysconfig module
>which subsequent invocations then use which is close to what Greg
>proposed except that the first run is not necessarily done by the
>installation Makefile.

        Yes. And there are number of approaches, some to be used before
the module is distributed as standard, and some after.

        We need to know we _can_ implement it, and we need some
actual implementations to examine, but this is not as important
as standardising the API. What we need to produce is a specification,
not (just) an implementation.

        And I come back again to the point that what the
client needs is a module that actually compiles C code to
a dynamically loadable shared library, so that the supplier
can provide the C code _without_ any configuration stuff.

        Getting the compiler flags, etc, is all very well,
but it isn't what is required by the end user.
The person who needs all these flags is probably
the supplier .. when the client complains the code doesn't compile.
So it is important that the detail data be portable (i.e. can be 
physically sent across the internet).

        In my opinion, what is important is the API: the actual
function signatures used to compile C code. Not how they're
implemented.
-------------------------------------------------------
John Skaller    email: skaller@maxtal.com.au
		http://www.maxtal.com.au/~skaller
		phone: 61-2-96600850
		snail: 10/1 Toxteth Rd, Glebe NSW 2037, Australia