I've drafted a topic on implicit parts:
But I don't like the example. A better example would be a ``server`` part that generated a zdaemon runner that depended on a software (e.g. zc.wsgirunner + app) part that build the thing to be run and a config part that generates its config:
[buildout]
develop = .
parts = server
[server]
recipe = zc.zdeamonrecipe
program = ${buildout:bin-directory}/run-wsgi ${config:location}
[config]
recipe = zc.recipe.deployment:configuration
text = ...
[app]
recipe = zc.recipe.egg
eggs = zc.wsgi-runner
myapplication
But zc.recipe.egg doesn't have any data that's useful and there's no explicit way to say that one part depends on another. I'm thinking there should be some way to declare required parts without referring to part options. If buildout was brand new, I'd be tempted to use a ``parts`` option in parts, but I don't think that's an option now.
I could do something with unusual option names, as I did with macros.
[server]
& = app config
recipe = zc.zdeamonrecipe
program = ${buildout:bin-directory}/run-wsgi ${config:location}
Or maybe:
[server]
<requires> = app config
recipe = zc.zdeamonrecipe
program = ${buildout:bin-directory}/run-wsgi ${config:location}
Hm, I kinda like that last one. Maybe say <name> is reserved for buildout. We could make <= a shorthand for <extends> =.
Or maybe something in the section header:
[server :requires app config]
recipe = zc.zdeamonrecipe
program = ${buildout:bin-directory}/run-wsgi ${config:location}
(Somehow, I don't like that. In fact, I might rather do conditional sections as:
[extensions]
?= windows
ext = .bat
)
Or make-like
[server]: app config
recipe = zc.zdeamonrecipe
program = ${buildout:bin-directory}/run-wsgi ${config:location}
or
[server]
: app config
recipe = zc.zdeamonrecipe
program = ${buildout:bin-directory}/run-wsgi ${config:location}
or ...
Jim
P.S.
- This illustrates why I like writing real documentation before implementing features.
- I'm happy to use some other template recipe if there's a better one that works with Python 2 and 3. :) I just use what I know.