[Grok-dev] Why the grokproject specific addition to bootstrap.py of installing eggbasket?

Roger Erens roger.erens at e-s-c.biz
Thu Jun 4 10:29:47 EDT 2009

on 3-6-2009 22:08 Maurits van Rees wrote:
> Roger Erens, on 2009-06-03:
>> Hi,
>> in the grokproject-1.04a-py2.5.egg/grokproject/template_directories the 
>> bootstrap.py files contain the addition
>> zc.buildout.buildout.main(sys.argv[1:] + ['-v', 'install', 'eggbasket'])
>> Why is this line needed?
>> When, following an unmodified bootstrap.py, a bin/buildout is run with 
>> the buildout.cfg based on the template (containing a line parts = 
>> eggbasket ...)
>> the tarball will be installed first, too?
> Correct, and the end result is the same.  But it will be slower.  Why?
> A regular bin/buildout runs in two phases:
> 1. Initialize all the parts.
> 2. Install all the parts.
> The problem here is that during the initialize phase lots of eggs
> already get installed because they are needed by the recipes that
> handle the parts.  And those eggs will not be taken from eggbasket as
> that only does its work during the install phase.
> I think at one point as much as 50% of the needed eggs were already
> installed this way before eggbasket got a chance to download its
> tarball.  Probably that was mostly caused by the i18n recipe that we
> were using - I am not sure if that is still the case.
> Anyway, with that line that specifically installs eggbasket first,
> what happens is:
> 1. Initialize eggbasket.
> 2. Install eggbasket.
> 3. Initialize all the parts, which can now use the eggs that eggbasket
>    has already installed.
> 4. Install all the parts.
> Cheers,

Thanks for the clearing this up to me.

I have two remaining thoughts:

I) When a user has already defined (and filled) an eggs-directory (e.g. 
via the ~/.buildout/default.cfg file), the speed improvement will be 
less pronounced. Thus the use case for this optimazitation is mainly 
when a newly released tarball is to be processed by the eggbasket recipe?

II) In the total workflow, the speed optimization may be even less 
pronounced, as I still have a Bottle Neck Existing Between Keyboard And 
Chair. Only after I come back from my coffee break that follows the step 
2) you described above, I find the prompt 'You may now run bin/buildout' 
that is awaiting my command for some indetermined time. Now, I have to 
go for a second cup of coffee to await the results of step 3) and 4).
This could be solved by adding another addition to bootstrap.py that 
involves running just plain bin/buildout, right?



More information about the Grok-dev mailing list