[Zope-dev] Re: Mixing recipes (zc.recipe.cmmi reuse)
Martin Aspeli
optilude at gmx.net
Tue Sep 18 19:35:11 EDT 2007
Sidnei da Silva wrote:
> Hi there,
>
> Not sure this is the right list, but let's give it a try.
>
> I would like to use the 'patches' functionality from zc.recipe.cmmi
> together with other recipes. I believe this is useful functionality
> and is interesting to all sorts of recipes, not only to cmmi-based
> ones.
>
> So the question is, does the zc.buildout architecture support reusing
> options from a recipe on other recipes? Or would it require the recipe
> writer to explicitly 'subclass' (?) cmmi to get patch functionality?
> Or even, would a 'post-fetch'/'pre-build' generalization be desired,
> 'patch' being one such application?
I've seen subclassing, or explicit instantiation, e.g. instantiate the
dependent recipe class as an instance variable and just call its
methods. I don't think you really need any magic from buildout here.
Recipes are pretty simple Python classes. Just make sure you pass the
options etc from __init__.py and you should be fine.
I think plone.recipe.plone uses plone.recipe.distro and plone.recipe.egg
in various ways. You may want to look at that.
Martin
--
Acquisition is a jealous mistress
More information about the Zope-Dev
mailing list