[Distutils] Zmake build system

Anthony Pfrunder s341625@student.uq.edu.au
Fri, 16 Jul 1999 13:03:04 +1000 (GMT+1000)


As part of the Zope project I've constructed a python build system which
uses python itself and works cross-platform.  Currently, only Visual C is
implemented but in the next few weeks plug-ins for cygwin and mingw32
should come online.

I would love to merge this in with dist-util so I can go back to playing
with ZClasses ;)

The system consists of:
	Make.py		Python script which reads makefiles and 'runs'
			can import Setup files (for building extensions)
			and generic makefiles.  Will soon be able to
			read ./configure output to get the variables

	Makefile.zmake	The platform generic makefile, recursively loads
			Setup files and then builds a python console,
			lib and pyd's (choose your targets)

	msvc\msvc.zmake Platform stuff for visual c.  Makefile hooks into
			generic one by adding stuff to dep lines and
			defing new rules.  Also includes custom rc, ico
			files (ie all the stuff that is in the PC build

A simple rule (building the parser module):

	parser: os.path.join(PythonHome, 'Modules', 'parsermodule.obj') parser.pyd 

Note: you can recursively import Setup files and normal unix makefiles so
you don't need to change anything (eventually...)

This will compile parsermodule.c (dumping temp stuff including def files
into directory pointed to by TMP) and link it to generate a pyd.  The
pyd will be placed in OUTDIRE for you.  See the python-lib,
python-lib-sources rules for a more complex example.  (note, the PC
specific stuff is added when msvc.zmake is loaded)

Beware that it is pre-alpha and is release only to provide a tool to build
Zope Extensions in VC.  You can grab a snapshot at:


Currently, it can build python-lin, console and extensions under Visual C


Anthony Pfrunder