[Distutils] SetupTools: Running EasyInstall From Within A Script?

Jim Fulton jim at zope.com
Fri Nov 17 18:57:11 CET 2006

Alexander Michael wrote:
> I am attempting to put together a simple package installation
> replicator to make it easier to pull updates from a local repository
> (as an alternative setup to a shared NFS directory). The idea is to
> put a requirements list and the necessary eggs in a local shared
> directory and then have a script on each computer do a quick check to
> see if any updates are needed and install them if there is an update.
> Is it possible to ask setuptools to install a package from within a
> Python script without resorting to os.system or friends? I tried
> browsing the source, but it was difficult to follow the call chain
> from the easy_install script to the actual method being called.

Technically yes, but not practically.

You might look at the easy_install module in zc.buildout,
which tries to provide a programmatic interface, although even it
resorts to os.spawn at times.  See:



Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org

More information about the Distutils-SIG mailing list