[Distutils] Initial auto-installation support

Ian Bicking ianb at colorstudy.com
Mon May 30 23:10:11 CEST 2005

I've added some very initial support for automatic installation of 
packages in Paste, using easy_install 
(http://peak.telecommunity.com/DevCenter/EasyInstall).  In a 
configuration file you can put:

   use_package(package_name, pkg_download_url=None)

And a couple other options, but we'll ignore those.  It will look for 
the named package, and if not found will install it (generally in 

This still doesn't work for all the packages that build-pkg.py fetches; 
specifically flup and Component don't have setup.py files, and 
PySourceColor.py is just a bare Python module.  I'd like for this system 
to work in spite of that, but it might also make sense to just fix all 
of those.  (And actually I'm not super-enthusiastic about PySourceColor, 
so if anyone has opinions on a better source colorizer I'm open.)

Right now there's some URLs for common packages in 
paste/default_config.conf (package_urls) -- wsgiutils, ZPTKit, 
ZopePageTemplates, scgi, and SQLObject.  Ultimately this data really 
belongs in PyPI, so that dictionary of URLs is just transitional.

There's another aspect to Paste installation, where some packages 
(plugins) need to write things into Paste.  I'm not sure quite how that 
will work -- maybe use_package() will see if there's a paste_install 
module in the package somewhere, and call that somehow.  But besides 
that, this should work now for any packages with a distutils install, so 
long as those packages are reasonably well behaved.  Hrm... except 
setuptools 0.3a2 doesn't have SourceForge download support, but 0.3a3 
does and I think PJE will release that soon.  Eh, I could come up with a 
bunch of other caveats too... this stuff is rough still, but feedback is 

Ian Bicking  /  ianb at colorstudy.com  / http://blog.ianbicking.org

More information about the Distutils-SIG mailing list