distutils alternatives?

Robert Kern rkern at ucsd.edu
Wed Jul 21 04:00:32 CEST 2004

Lonnie Princehouse wrote:

> I'm in a situation where I need to distribute several interdependent
> Python packages.  There are good reasons not to combine them all into
> one package.  Distutils doesn't seem to be able to bundle a
> heterogeneous mix of multiple packages and modules, and so I've
> currently got people launching three installers in the proper sequence
> in order to get software installed, which seems needlessly complicated
> and confusing.  There must be a better way.  What I really want is a
> way for the installer to automatically download and install
> dependencies...

The SciPy project has similar needs and extended distutils to do just 
that. Check out SciPy CVS at http://www.scipy.org/cvs/ .

The package you're looking for is scipy_core/scipy_distutils . It's a 
bit arcane, but it does what you describe and uses distutils as the 
base, so you get all the compiler and platform support already there, 
and the modifications to existing setup.py scripts should be managable. 
I don't think there's much documentation, if any, for using it outside 
of SciPy, but it's certainly general.

A few steps to get you started: do a CVS checkout of the scipy_core 
directory. Move the scipy_distutils subdirectory out and blast away 
scipy_core (which should now only contain stuff you don't need). You can 
then distribute scipy_distutils with your packages (as another toplevel 
package just under the directory with your uber setup.py that takes care 
of all of the packages).

Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter

More information about the Python-list mailing list