[Setup] Configuring buildout to install a python library: Structured Document installation

Alberto Lopes alberto at alopes.com
Thu Sep 25 04:16:56 UTC 2008

Figured it out myself.

Here is the solution for other people that might be newbie to buildout as me
and have the same need.

Buildout works with recipes: Python classes that "do the stuff". There are a
lot of different recipes, each one does a different kind of installation
procedure, as a step in a multi-step installation procedure.

For Structured Document, I needed a recipe that would simply grab the file
from the net, uncompress it and put it into an specific folder. For that, I
used the recipe hexagonit.recipe.download.

One good thing about buildout is that it is very very smart. You just need
to make the reference to the "new" recipe, and it automatically installs the
recipe from the Cheese Shop. So, you can use any of the recipes from this
list: http://pypi.python.org/pypi?:action=browse&show=all&c=512

So, here is the configuration for my case:

1 - I added a section in the end of the buildout.cfg for the SD

Alberto wrote:
> [sd]
> recipe = hexagonit.recipe.download
> url =
> http://plone.org/products/structured-document/releases/2.2.4/sd-2-2-4-tar.gz
> md5sum = c9a2d876f396e77d8e7949aad28946b4
> destination = /opt/Plone-3.1/zinstance/parts/instance/lib/python/sd
> download-directory = /opt/Plone-3.1/download/
> strip-top-level-dir = true

2 - I added "sd" as the last entry in the "parts" list at the beginning of
the file (right after unifiedinstaller)

3 - In the [instance] part of the file, there is this "zcml = " area for
registering slugs for the packages. SD needs to be registered here, so I
added "sd.app" after the equals sign.

That's it. Now SD won't get uninstalled after I (re-)buildout my site.


View this message in context: http://n2.nabble.com/Configuring-buildout-to-install-a-python-library%3A-Structured-Document-installation-tp1080777p1117178.html
Sent from the Installation, Setup, Upgrades mailing list archive at Nabble.com.

More information about the Setup mailing list