Linux

by Alexander Limi — last modified Feb 22, 2010 06:17 PM
Adding collective.xdv to our buildout on Linux

Prerequisites

On Linux, you may find that you need to download and install the libxml2-dev and libxslt-dev packages for your operating system. Use your normal package manager to see if you have these and install them if not.

Note for Ubuntu 8.04 you will need libxslt1-dev.

The buildout.cfg edits

Locate the file buildout.cfg in the root of your Plone instance directory on the file system, and open it in a text editor. 

The Dependencies

Locate the section that looks like this:

# extends = http://dist.plone.org/release/3.3/versions.cfg
extends = versions.cfg
versions = versions

It may also have a URL in the "extends" section, similar to the commented-out first line, depending on whether you pull the Plone configuration from the network or locally.

To add collective.xdv to our setup, we need some slightly different versions of a couple of the packages, so we extend the base config with a version list from the good-py service, so change this part of the configuration so it looks like this:

extends = versions.cfg
          http://good-py.appspot.com/release/collective.xdv/1.0
versions = versions

What happens here is that the dependency list for collective.xdv specifies some new versions for you via the good-py URL. This way, you don't have to worry about getting the right versions, Buildout will handle it for you.

The Egg(s)

Next step is to add the actual collective.xdv add-on to the "eggs" section of buildout.cfg. Look for the section that looks like this:

eggs =
    Plone

This section might have additional lines if you have other add-ons already installed. Just add the collective.xdv on a separate line, like this:

eggs =
    Plone
    collective.xdv [Zope2.10]

The [Zope2.10] is an "extra" which, in this case, tells buildout to get some additional functionality to ensure that everything works with Plone 3. If you are using Plone 4 you can omit this.

The additional egg is ZPublisherEventsBackport - if buildout ignores the "extra" command, then simply add this egg to your eggs list.

You should now be ready to run buildout, so hop back to the overview page of this section.