[PEAK] "setuptools" package preview

Phillip J. Eby pje at telecommunity.com
Sun Mar 7 17:38:21 EST 2004

I'm working on a set of distutils enhancements called "setuptools".  The 
"setuptools" extend the base Distribution class with the ability to do:

* feature management -- you can define subsets of a distribution as 
"features" that can be enabled or disabled via '--with-X' and '--without-X' 
options to 'setup.py'.  Features can (recursively) depend on other 
features, and be included or excluded by default.  (Their inclusion or 
exclusion affects all commands, as the relevant 
packages/modules/data/scripts/whatever are added or removed just after 
command line arguments are parsed.)

* package data installation -- you can specify filenames or globs to be 
searched for in package source directories, for installation alongside the 
package .py files.  All without munging the 'install_data' command or 
manually copying files, and the data files are correctly included in the 
'get_outputs()' manifest for all the distutils features that depend on 
knowing what files were copied.

* 'test' command -- optionally run a user-specified or 'setup.py'-specified 
test suite via the 'unittest' module.

* Packages and modules can be simultaneously specified as arguments to 
'setuptools.setup()', unlike the standard distutils 'setup()'.

The above features are all fully implemented and documented via docstrings, 
and the majority of them are covered by an extensive unit test 
suite.  "setuptools" uses itself for its own 'setup.py', in order to enable 
the 'test' command to run its built-in unit tests.

The purpose of "setuptools" is to collect commonly useful distutils 
enhancements for large or complex packages like Zope X3 and PEAK.  It's 
also intended to be the starting point for developing simple installer-side 
dependency support, as described/proposed at:


Finally, I also intend to add some type of general-purpose documentation 
build and install facilities, to replace the rather hacky documentation 
support in my current setup scripts.

At this point, the package isn't quite ready for general release, as it 
doesn't include documentation beyond docstrings, and of course the 
dependency and documentation features aren't written yet.  But I believe it 
is ready for feedback from interested parties such as PyCon sprinters, and 
people who are undertaking complex distutils projects.  I'm interested in 
your comments, especially as they may relate to the viability of eventually 
merging setuptools into a "Distutils 2.0" (or maybe "1.5").  Setuptools is 
specifically laid out to match the package layout and naming conventions of 
the distutils in order to facilitate such porting.

You can currently find the setuptools CVS at:


although there has been some discussion about moving it to the Zope X3 CVS 
in the near future to facilitate the coming sprint, and other contributions.

Please follow up with discussion to the distutils-sig mailing list.  Thanks.

More information about the PEAK mailing list