Jim Fulton - zc.buildoutΒΆ

Tags: instancemanager, europython, europython2006, plone, buildout

At zope corporation they had problems with getting their heads around how to use eggs in a development environment. Their existing buildout environment was starting to show its age and it might just be the thing to manage those eggs.

Eggs are self-contained zero-installation python module installers. easy_install modulename installs the module for you. At the simples level they are simply directories that can by included in you sys.path.

The hard part is:

  • Deciding which eggs to use.
  • Building up your sys.path.

Setuptools is the heart of all this, it helps you build eggs, it handles dependencies. easyinstall finds distributions on the net and installs the build eggs into specified locations.

Some things he doesn't want:

  • Modify his python installation. Modifying that influences other projects that use the same
  • No runtime configuration (PYTHONPATH).
  • No accidental upgrades (setuptools figures out the dependencies, so installing another module might trigger updates to other modules which you might not always want).
  • Custom script generation.

Jim wanted greater control over the eggs that are used. Specific versions, so that they can test the exact software that they're going to ship. You don't always want the newest of everything.

He figured out that the old zc.buildout could be revamped and be used to manage the eggs. Buildout creates an assembly of parts, for instance to assemble databases, zeo servers, app servers, etc on multiple machines. The initial versions were make-based, which is a terrible scripting language. A few months ago he started on a 1.0 that would be made in python and that would manage eggs.

Buildout consists of recipes, which are small python classes or methods that do one thing (like installing something). Recipes are managed as eggs. So there's support for developing python software using developer eggs.

Each buildout has a configuration database build with python's configparser, a simple example:

 [buildout]
 develop = mkdir
 parts = mkdir
 log-level = INFO

 [data_dir]
 recipe = mkdir
 path = mystuff

It is under active development and it is ready for production. There will be recipes that are missing that you might have to write yourself. A near term goal is better control

Note by Reinout: I've made a program that partially does the same things, though on an entirely different basis and aimed a bit more at plone: "instancemanager"http://plone.org/products/instancemanager . See also the weblog entries on that subject .

 
vanrees.org logo

Reinout van Rees

My name is Reinout van Rees and I program in Python, I live in the Netherlands, I cycle recumbent bikes and I have a model railway.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):