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

Maurits van Rees m.van.rees at zestsoftware.nl
Wed Jun 3 16:08:10 EDT 2009


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,

-- 
Maurits van Rees | http://maurits.vanrees.org/
            Work | http://zestsoftware.nl/
"This is your day, don't let them take it away." [Barlow Girl]



More information about the Grok-dev mailing list