[Distutils] Access to Python config info
Fri, 25 Dec 1998 01:55:04 +1000
At 11:58 22/12/98 -0500, Fred L. Drake wrote:
>John Skaller writes:
> > This depends on knowing where the makefile and
> > the config file are. Which suggest a further factorisation:
> Ok, I've modified distutils.sysconfig to contain:
> parse_config_h(fileobject, g=None)
> parse_makefile(fileobject, g=None)
> Note that the parse_*() routines take a file object instead of a
Ah, that seems even better, yes!
>and the dictionary to update may be passed in. If no
>dictionary is provided a new one is used. However the dict is
>obtained, it is returned by the function.
Right. Seems OK.
> Equivalents for non-Unix platforms are still needed; has anyone
>thought about Windows or Mac platforms?
I don't think we (necessarily) need equivalents
for the following reason:
the sysconfig data isn't meant for user access: its there to support
implementation of functions like 'compile_this_c_as_a_module'.
It is these functions which need to be standardised
(that is, cross platform). For the VC++ windows build, sysconfig
could be omitted entirely, and a hand written 'compile' function
provided. For Unix, it is convenient to parameterise such
a function with the config data -- for that is the way the autoconf/
make/blah blah process works.
none of this implies there shouldn't be an equivalent;
but I think the important interfaces is the 'OO' one: <grin>
the one characterized by function semantics rather than values
of data attributes.
> I passed on this for now. I think the cross-platform issues need to
>be explored more.
I agree. I would like people to explore the interface
of my compilers module to see if it is _possible_ for that
interface to work on all platforms. It may be that the
Unix implementation uses sysconfig data to adapt to various
Unix platforms, whereas the Mac or Windows version is
hard coded, or uses a different scheme.
John Skaller email: email@example.com
snail: 10/1 Toxteth Rd, Glebe NSW 2037, Australia