[Grok-dev] Re: Problem following the tutorial "Make use of add-ons via eggs"

Martin Aspeli optilude at gmx.net
Fri Feb 29 18:53:09 EST 2008


Philipp von Weitershausen wrote:
> Alexander Limi wrote:
>> On Fri, 29 Feb 2008 12:01:53 -0800, Martijn Faassen 
>> <faassen at startifact.com> wrote:
>>
>>> I've seen other people make mistakes like this: run buildout from the 
>>> 'bin' directory and things not working then. I think it would be a 
>>> good idea if you extended your tutorial with a note to that effect in 
>>> the "run bin/buildout" section.
>> Isn't this something that should be reported as a bug in buildout? It 
>> already assumes things about the directory structure, and running it 
>> within the directory should ideally work just as well as running it from 
>> the outside, shouldn't it?
> 
> Philosophically speaking, this is not a bug. 'buildout' simply works in 
> '.', so it expects a buildout.cfg in the CWD. Therefore, if you're not 
> in a directory that has a buildout.cfg (e.g. because out of habit you 
> always cd to the executable), then it can't be buildout's fault.
> 
> That is, strictly speaking. buildout *could* do a couple of things to 
> alleviate this problem:
> 
> * Better error messages. In addition to what it finds missing, it could 
> tell you what you should probably do (e.g. "Make sure you're in the 
> directory containing the buildout.cfg.")

Error messages are the one thing I am most disappointed with when it 
comes to buildout. All too often it says "there was an error, it's 
probably a problem with the recipe" without any useful debug 
information. You can get to a pdb prompt easily enough (the -D option), 
but that's no good for regular users.

Since buildout deals with so many different environments and tries to be 
the layer that makes them sane for other things to rely upon, detailed 
logging and error reporting are very important.

> * Better documentation (explaining buildout's CWD-based nature)
> 
> * The bin/buildout script within a buildout could explicitly cd to the 
> right directory (which could simply be hardcoded in that generated script).

+1 ;-)

Martin

-- 
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book



More information about the Grok-dev mailing list