[Distutils] Question re zc.buildout Name Expansion Rules

Jim Fulton jim at zope.com
Tue Jan 29 16:22:53 CET 2008


On Jan 29, 2008, at 9:52 AM, Jeff Rush wrote:

> In using buildout, I've come across a couple of limitations and I'm  
> wondering
> if there are workarounds.
>
> 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/

Jim

--
Jim Fulton
Zope Corporation




More information about the Distutils-SIG mailing list