plonebuildoutzcml

What's the buildout:zcml option for?


In one of my projects' buildout.cfg files I have something like this:

[buildout]
...
zcml =
    my.package
    plone.reload
...

Everything works fine but I'm still puzzled about what's the reason some packages do need to be listed here and why others don't.

What's the purpose of it to begin with?

While doing some research I end up on https://pypi.python.org/pypi/munin.zope/2.1 which says that if you use z3c.autoinclude and plone (+3.3) you don't need it.

Does that mean that if a distribution has the z3c.autoinclude slug on its setup.py, i.e.

entry_points="""
# -*- Entry points: -*-
[z3c.autoinclude.plugin]
target = plone
""",

you don't have to care about buildout:zcml?


Solution

  • There is no inherent functionality related to the zcml parameter in the [buildout] section, other than a convenient place to define zcml.

    Typically an [instance] section will refer to it:

    [instance]
    recipe = plone.recipe.zope2instance
    eggs = Plone
    zcml = ${buildout:zcml}
    

    The use of buildout:zcml similar to buildout:eggs is an anti-pattern, IMO