Buildout is great for development and for deployment. How to combine the two? Jean-Paul Ladage and me did some brainstorming on this and we'll show you what we came up with. I'm trying it now on a project and I'm pretty happy with it. Some prerequisites and assumptions:
Production and preview must be tagged buildouts. If preview is signed off on, it becomes the new production. In that case an "svn switch" to the relevant tag is done in the production buildout.
Production, preview and development differ in the port settings, zeo settings, debug mode, etcetera.
Production and preview do not differ in products, as a tagged buildout should progress from preview to production without changing. Production/preview and development do differ in products, naturally.
The following five buildout config files are needed to handle this:
unstable.cfg and devel.cfg could be combined, but experience has shown that it is harder that way to spot what you have to move from development to production. The extra hassle just isn't worth the worry about the extra file.
This way, with some care, a single buildout directory can be used for all three cases. It makes it easier to coordinate the move from development to production.
Externals in the form of downloadable tarballs and eggs are handled like a charm by buildout. No problems there. Problem cases are:
Handling svn externals in a buildout that is used for both production, preview and development is a pain. Keeping the svn checkout information inside buildout (with the infrae.subversion recipe) is the solution here. You'll need two infrae.subversion sections in case you have both products and eggs under development.
Note that we're talking "products" here. Keep the lib/python stuff as externals in src/* as they don't interfere if you don't enable them. I couldn't get those to work with infrae.subversion (chicken/egg problem as you can't reference those eggs in [buildout] if you still have to download them from the same section).
My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.
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):