[Distutils] Question re zc.buildout Name Expansion Rules

Jeff Rush jeff at taupro.com
Tue Jan 29 15:52:48 CET 2008


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.

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.

Thanks for any tips,

-Jeff


More information about the Distutils-SIG mailing list