Buildout parameter parsing

Asked by Malthe Borch

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.

(originally posted to zope.devel)

Question information

Language:
English Edit question
Status:
Solved
For:
Buildout Edit question
Assignee:
No assignee Edit question
Solved by:
Malthe Borch
Solved:
Last query:
Last reply:
Revision history for this message
xkenneth (xkenneth) said :
#1

Malde, this is interesting, but I see an inherent architecture problem. Buildout is built ontop of ConfigParser, and the format doesn't specificy this, you might be able to get away with = + or =+ or something like that. Also you might be able to do something like..

[section]
eggs = mynew.egg
           ${othersection.eggs}

Regards,
Kenneth Miller

Revision history for this message
Malthe Borch (mborch) said :
#2

The solution you sketch out is exactly what I'd like to avoid –– but it's unfortunate if it's an inherent architecture problem with ConfigParser.

It's not hard to understand how it could be though. Would it be very difficult to extend the grammar to support it?

Revision history for this message
xkenneth (xkenneth) said :
#3

I'm not sure, ConfigParser is part of the standard library, but I might be wrong in the first place as it might support/ or be able to support this with extension. I'll wait for someone who knows what they're talking about to chime in. :-P

Revision history for this message
Malthe Borch (mborch) said :
#4
Revision history for this message
xkenneth (xkenneth) said :
#5

Malthe,

       Is there any plan on merging this into the trunk?

Regards,
Ken

Revision history for this message
mustapha benali (mustap) said :
#6

Hi malthe ,

You helped a lot: cleaned up the tests, merged them into buildout.txt and created the branch.

THX
/Mustapha