[Distutils] [zc.buildout] "Adding and removing options" section unclear

Jim Fulton jim at zope.com
Tue Jul 15 21:55:48 CEST 2008


On Jul 15, 2008, at 3:47 PM, Chris Withers wrote:
...
>>> The demo also uses extending of configurations as well as buildout  
>>> extensions before these have been introduced as concepts.
>> Yup. That's annoying. This section should be moved until after  
>> extending has been described and should use an extension.
>
> I'm guessing you mean "shouldn't use an extension"? Extensions look  
> like something I don't ever want to have to use ;-)

Right. They are a rather advanced feature.  We use them to support  
sftp urls.


>>> when extension1.cfg is used, but there's no explanation of how  
>>> this works. Are option values always split on spaces
>> Yes
>
> Okay, I don't know if there's a "this is how sections, names and  
> values" work section but if there isn't, there should be, and if  
> there is, I missed it

http://pypi.python.org/pypi/zc.buildout/1.0.6#configuration-file-syntax

> and I don't remember reading anything about how and where values are  
> split ;-)

Parsing of option values is specific to individual recipes, so it  
isn't part of the general syntax.  Having said that, many many options  
are treated as white-space delimited sequences of values. The += and - 
= syntax is only useful for options that have this form.  The  
documentation should have said more about this.


> (ie: does a recipe get the values pre-split

no

> or does it need to split itself

yes

> and therefore is it just convention that prevents a recipe from  
> splitting on other characters too?)

Yes. In fact, if values can have spaces in them, then a option may be  
split on new lines.  For example the eggs option in many recipes,  
which should really be named "requirements", is split on new lines  
because the individual values can have spaces in them.

Jim

--
Jim Fulton
Zope Corporation




More information about the Distutils-SIG mailing list