[Distutils] zc.buildout - multiple 'cascading' buildout.cfg files

Maurits van Rees m.van.rees at zestsoftware.nl
Tue Jul 13 13:50:03 CEST 2010


Op 12-07-10 18:19, Alan Franzoni schreef:
> Hello,
> I'm wondering if there's a way to have something like "local"
> buildout.cfg files overriding a "master" one; e.g.
(...)
> This would be useful because in our projects we usually share one
> per-project buildout.cfg which every team member uses and it's stored on
> our VCS, and it's used all around including along our CI server, and we
> don't want to change it if a real configuration change is unneeded, but
> often I need to tinker with it (e.g. I want to use one additional
> development egg, or change a dep, or run a different recipe).

First, no I don't know a way to do this like you propose.

Second, what me and my colleagues at Zest Software do, is to not have a 
buildout.cfg in our VCS.  Instead we have a devel.cfg for development 
and a production.cfg for the live site (and possibly a preview.cfg) in VCS.

When working on the project on my laptop, I make a symbolic link from 
buildout.cfg to devel.cfg (e.g. 'ln -s devel.cfg buildout.cfg').  If I 
want to make more local changes, then instead of creating a symbolic 
link, I create a buildout.cfg file like this:

[buildout]
extends = devel.cfg

[one]
# changes go here

The buildout.cfg file is ignored by the VCS.

-- 
Maurits van Rees
Programmer, Zest Software



More information about the Distutils-SIG mailing list