[Distutils] Anonymous CVS up-and-running

John Skaller skaller@maxtal.com.au
Sun, 20 Dec 1998 23:14:09 +1000

At 18:54 18/12/98 -0500, Greg Ward wrote:
>Hi all --
>undoubtedly it's wildly premature to have source available before we
>have any sort of high-level design, but what the hell.  

        Absolutely NOT! Gee, haven't you learned some OO? <g>
OO is a bottom up. You do detail work BEFORE you have a high
level design. What you have done is absolutely right. Thanks!!

>Only things there so far are my version number module and Fred's
>sysconfig module.

        Please put my compilers module in it too.
It provides the high level abstract interface that is actually needed.
At least, it tries to. It needs work! It needs a third component
for Java as well.

I have incorporated the sysconfig module into interscript.
Here are my comments on the sysconfig module.

1) C++ is not supported. If the option is not provided to build
py++, a separate distribution may follow. Do we want that?

[py++ is the same as python, except that the main translation
unit is built with C++: the C built library is still used]

We need the Makefile to support C++ so sysconfig can get
C++ compilation flags.

2) Some of the data, such as CFLAGS, is useless because it reflects
the python source build tree. On my system 

        CFLAGS = '-g -O2 -I./../Include -I.. -DHAVE_CONFIG_H'

3) The directory for config.h is WRONG!
config.h lives in


but the sysconfig module looks in


CHANGE the line which gets this wrong TO:

        config_dir = os.join(
                sys.exec_prefix, 'include','python'+version)

4) On my system:

        SIZEOF_INT = '4'

which is wrong, it should be

        SIZEOF_INT = 4

I got this using 'repr(value)'.
Most other numeric values are OK.

5) I think the module should NOT just put values
into itself like

        FLAG = VALUE

I suggest:

        C_CAPABILITIES -- dictionary or module containing stuff from config.h
        MAKE_FLAGS -- dictionary or module containing Makefile variables

be attributes of sysconfig. If you do not like writing


then go for the module, which allows:


6) There is no information from Setup. It would be useful to
get the Tcl/Tk library and headers into the configuration
if it was built. Hmmm. :(

7) _init_posix should NOT modify a dictionary, but return one:

        g = globals()


        g = {}

and add

        return g

to the end of the routine. Replace the exec line with

        g = eval('_init_%s()' % os.name)

and add

        for k in g: globals()[k] = g[k]

if you really want to modify the module dictionary.
I don't. I use the data to generate the python
source of another module. This is important to me:
the generated python can be transmitted over the Internet.
It can be edited. And I can have several distinct

What I do is that the build code is NOT in sysconfig,
but inline interscript (python) code which is executed to BUILD
a file 'sysconfig.py'.

8) LINKCC = ' gcc' has a bad leading space.

9) I have no idea how to use the available information.
There are flags all over the place.
John Skaller    email: skaller@maxtal.com.au
		phone: 61-2-96600850
		snail: 10/1 Toxteth Rd, Glebe NSW 2037, Australia