Installing Dexterity

by Martin Aspeli last modified Nov 26, 2011 05:58 PM
How to install Dexterity and use it in your project

Dexterity is distributed as a number of eggs, published on PyPI. The plone.app.dexterity egg pulls in all the required dependencies and should get you up and running. However, you may also need to upgrade a few of the packages that come with Zope 2 (at least with Zope 2.10 and 2.12). This how-to explains what you need to do use Dexterity in a standard Plone buildout.

Known good versions

A set of known good versions can be found via the good-py service. You can view Dexterity's releases here: http://good-py.appspot.com/release/dexterity. At the time of writing, the latest release is 1.1. Thus, you can have a buildout like this:

[buildout]
extensions = buildout.dumppickedversions
unzip = true
parts = instance
extends =
    http://good-py.appspot.com/release/dexterity/1.1?plone=4.1.2
versions = versions
develop = 

[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
http-address = 8080
debug-mode = on
verbose-security = on
eggs = 
    Plone
    plone.app.dexterity

Note that:

  • We use the buildout.dumppickedversions extension to help show what versions buildout picked for any dependencies not pinned  in the buildout. This helps trace any dependency issues.
  • We extend the Dexterity release known good set. We specifically say that we are merging the Dexterity release set with the Plone release set at the given version, 4.1.2 (the latest stable version at the time of writing). This allows Dexterity to safely override certain versions of Plone packages.
  • In the instance configuration, we load the Plone egg and plone.app.dexterity. The latter will pull in all the Plone dependencies.
  • Since plone.app.dexterity configures a z3c.autoinclude entry point, there is no need to load a separate ZCML slug.

Your own buildout may be more extensive. The developer manual shows a more comprehensive one with some debugging tools, for example. However, the buildout above should be enough for creating types through the web. If you are using a package that itself depends on plone.app.dexterity, then the second eggs line becomes superfluous as well, of course.