[Distutils] [buildout] ${} substitutions don't happen in buildout:extends?

Chris Withers chris at simplistix.co.uk
Wed May 12 10:57:48 CEST 2010


Jim Fulton wrote:
>> For example, here's a project buildout:
>>
>> [buildout]
>> extends = ${buildout:base_location}/versions/repoze.bfg-1.2-versions.cfg
>> ...
>>
>> And here's what's in ~/.buildout/default.cfg:
>>
>> [buildout]
>> base_location = /Users/chris/LocalSVN/base
>>
>> ...but, the normal ${} substitution doesn't appear to happen in the extends
>> line, so I get the following error:
>>
>> IOError: [Errno 2] No such file or directory:
>> '/Users/chris.withers/LocalSVN/demoapp/${buildout:base_location}/versions/repoze.bfg-1.2-versions.cfg'
>>
>> What am I doing wrong?
> 
> Nothing. There are certtain stages of processing where variable
> substitution isn't done.
> This is, in part because the variable database hasn't been established yet.
> 
> I think the situation needs to be improved. At least, I think variable
> substitutions
> could reflect the database as it exists at the time of a variables use.  This
> would allow extends to use variables defined on the command line,
> in default.cfg and in files already read.  Of course, the restrictions
> that remain should be clearly documented.

This all sounds great. I hope it gets implemented some time, if you need 
anything testing, please let me know!

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk



More information about the Distutils-SIG mailing list