[Grok-dev] Re: Making an egg bundle for Grok
Philipp von Weitershausen
philipp at weitershausen.de
Sat May 17 06:08:17 EDT 2008
Maurits van Rees wrote:
> Hi fellow grokkers!
> Out of the Grokkerdam sprint z3c.recipe.eggbasket was born. This lets
> you quickstart a grok project by first installing the grok egg and its
> dependencies from a tar ball without relying on a zillion cheese shops
> and sourceforges, like this:
> recipe = z3c.recipe.eggbasket
> eggs = grok
> url = http://grok.zope.org/releaseinfo/grok-eggs-0.12.tgz
Just to make sure, this recipe will do nothing if whatever you specified
in 'eggs' was already installed, right?
> It has a buildout.cfg for testing. The important part is this, which
> you could add to any random buildout (say the grok one):
> recipe = zc.recipe.egg
> eggs = z3c.recipe.eggbasket
> arguments =
> egg = 'grok',
> versionfile = 'http://grok.zope.org/releaseinfo/grok-0.12.cfg'
> This is slightly awkward: note the comma and the quotes that are
> needed in the arguments. But it does the trick.
Right. This is a trick that works when you have regular console_scripts
that you want to pimp up with arguments from buildout.cfg. However, this
script that you're providing (currently called releasemaker) really only
works within a buildout anyway, right? So I suggest writing a small
recipe that installs the script, that way the parameter configuration
could be a bit nicer:
recipe = z3c.recipe.eggbasket#bundlemaker
eggs = grok
versionfile = http://grok.zope.org/releaseinfo/grok-0.12.cfg
The 'bundlemaker' recipe would be a very simple recipe along the lines
of zc.recipe.testrunner, for instance, which also installs an executable
with extra parameters from buildout.cfg.
> I would say: just try it out. For testing it is faster to use for
> example 'martian' instead of 'grok'. That will give you a tar ball
> with just the martian and zope.interface eggs.
> So: there is working code and there is lots of room for improvement
> (don't get me started). Now would be a good time to hop in with
> contributions, cheer me on or point me in a different direction.
> Testing on Windows would be cool too, both of the script and the
> recipe. :)
I tested at least the releasemaker script on Windows. It works nicely,
though the tarball contains binary eggs, which is what we want, I
suppose. I just think that the tarball's name should contain the 'win32'
moniker somewhere to distinguish it from the pure-source tarball.
> Naming suggestions for the script are also welcome: releasemaker,
> releaser, eggbasket, create_egg_bundle, shipit, etc.
I think releasemaker is a bit besides the point. It doesn't really make
a release, does it. It makes a bundle of a bunch of released stuff, so
bundlemaker or make-eggbasket or whatever seems like a better name.
More information about the Grok-dev