[Distutils] Question re zc.buildout Name Expansion Rules

Jeff Rush jeff at taupro.com
Tue Feb 5 11:23:25 CET 2008

Jim Fulton wrote:
> On Jan 29, 2008, at 9:52 AM, Jeff Rush wrote:
>> Suppose I have something like:
>> [FreeTDS_installation]
>> recipe = zc.recipe.cmmi
>> url = blah
>> odbcinst_ini =
>>    [FreeTDS]
>>    Driver = ${FreeTDS_installation:location}/lib/libtdsodbc.so
>> 1) Since the variable expansion is referring to an attribute of its
>>   own .cfg section, is there a way to omit the section name?
>>   Something like (but this doesn't work):
>>     Driver = ${location}/lib/libtdsodbc.so
>>   It just seems extra work to keep putting my own section name
>>   in, and is dangerous if I cut/paste lines to move about.
> Yup.  I do plan to add a syntax for this.


>> 2) The initial case above fails to parse because at the time
>>   the ${} expression is reached during read-in time, the part
>>   section has not yet been added to the global registry of
>>   part sections.  Hence I get a "FreeTDS_installation"
>>   undefined error.
>>   It just seems there ought to be a way for a part section
>>   to refer to its own location attribute.
> I agree that this would be helpful. (This is going to be tricky to
> implement, but that's a separate issue.) Would you mind adding a feature
> request at:
>   https://blueprints.launchpad.net/zc.buildout/

I have done so.


More information about the Distutils-SIG mailing list