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

Philipp von Weitershausen philipp at weitershausen.de
Fri Feb 29 18:16:53 EST 2008

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.")

* 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).

More information about the Grok-dev mailing list