[Distutils] Installing large applications

Fred L. Drake, Jr. fdrake at acm.org
Mon Jun 14 13:49:33 EDT 2004

Distutils has a moderately good reputation for being easy to use for
packaging and installing Python libraries (modules and packages).  For
everything else, it's pretty clearly a work-in-progress.

For large applications, distutils has much of the needed support, but
needs a bit of polishing to make it easier to work with.  I'll
characterize a "large application" as having a large body of Python
modules and packages, one or more programs that provide the user
interface (either command line or GUI, or both), and possibly data and
configuration.  The Python libraries which form part of an application
may or may not be usable outside the application, but are often not
intended for general use.  Zope is an example of a large application;
there are several others.

One interesting aspect for such applications is that it is often
desirable to install multiple versions of the application on a single
system.  This is often needed when evaluating new versions to
determine whether an upgrade may be performed safely, or whether new
features are sufficiently valuable to incur the cost and risk of data

On Unix, the "install --home <someplace>" command and option can be
used to create an appropriate installation, but that is not supported
on Windows.

It would be desirable to be able to indicate in the call to
distutils.core.setup() that a distribution is an application that
wants this kind of installation.  The value for the indicator could be
a name that's used to compute the platform-dependent default location.
For example, if the indicator were "ZopeX3-3.0.0", the default
location on Unix might be "/opt/ZopeX3-3.0.0/".

The default layout of files within an application may match that of
the --home installation scheme, or may not, but should be the same
across platforms.


A new keyword, "application", will be supported by
distutils.core.setup().  The value will be the name of the application
and should be used to compute the default installation location.  The
installation scheme will match that used by --home on Unix, and
support for an equivalent scheme will be added on Windows.

A new command-line option will be added to allow the location to be
changed.  "install --application <name>" will cause the installation
to occur in /opt/<name>/ (or some Windows equivalent) instead of the
default.  "install --application /some/path" will cause the
installation to occur in /some/path/.  Distutils should not allow the
installation to use an existing directory without an explicit override
from the user (--force?).

The Windows installer will be modified to allow alternate installation
directories to be supported, and provide the same behavior for
applications by default.


Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation

More information about the Distutils-SIG mailing list