[Distutils] zc.buildout: Declare options in a recipe and use it in another recipe

Jim Fulton jim at zope.com
Tue Aug 10 16:41:40 CEST 2010


On Tue, Aug 10, 2010 at 10:27 AM, Udo Spallek <udono at gmx.net> wrote:
> Hello,
>
> like to write a custom recipe. The recipe should be able to introduce a
> new variable (or option) which can be used in another part of
> buildout.cfg.
> I try to catch this with the buildout.cfg and recipe attached below. The
> recipe is found, installed and called with part1 right before part2. So
> far so good.
>
> My problem is in part2.  New_option is always empty and not filled with
> the result (testresult) in recipe test-new-option.
>
> How can I declare and transport options from one recipe script to
> another?

You must do this in __init__, not in install.  Options are
resolved before installation methods are called, so for
a recipe to create options to be consumed by other
recipes, it must do so in the __init__ method.

Jim

-- 
Jim Fulton


More information about the Distutils-SIG mailing list