[Zope-dev] Buildout parameter parsing

Rafael Oliveira rafaelbco at gmail.com
Tue Jun 3 12:02:00 EDT 2008


On Tue, Jun 3, 2008 at 9:52 AM, Malthe Borch <mborch at gmail.com> wrote:
> I think a valuable extension to the parameter parsing in buildout's
> configuration language would be to allow += and -= operators, which would
> append and remove items, respectively.
>
> Example:
>
> [instance]
> eggs += Products.PDBDebugMode
>
> Singular or plural arguments would be supported.

It would be very useful when used together with "extends". Example
(taken from [1]). You have a base.cfg:

"""
[instance]
eggs =
    PILwoTK
    lxml > 2.0
    zope.testing == 3.5
"""

And you want to write a development.cfg, which adds a new egg for
debugging. Currently you have to do:

"""
[buildout]
extends = base.cfg

[instance]
eggs =
    PILwoTK
    lxml > 2.0
    zope.testing == 3.5
    Products.PDBDebugMode
"""

With the new operator you could simplify it to:

"""
[buildout]
extends = base.cfg

[instance]
eggs += Products.PDBDebugMode
"""

Tell me if I misunderstood the idea.

[1] https://svn.infrae.com/buildout/silva/trunk/profiles/

Regards,
-- 
Rafael Bruno Cavalhero de Oliveira <rafaelbco at gmail.com>
Analista de Sistemas - Paradigma <http://www.paradigma.com.br>
Mestrando em Ciência da Informação - UFMG
http://rafaelb.objectis.net


More information about the Zope-Dev mailing list