views:

430

answers:

1

I know that the reccomended way to install Zope is with Buildout, but I can't seem to find a simple buildout.cfg to install a minimal Zope 2 environment. There are lots to install Plone and other things.

I've tried:

[buildout]
parts = zope

[zope]
recipe = plone.recipe.zope2install
eggs =

But I get:

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/tmp/tmp2wqykW/zc.buildout-1.3.0-py2.4.egg/zc/buildout/buildout.py", line 1519, in main
  File "/tmp/tmp2wqykW/zc.buildout-1.3.0-py2.4.egg/zc/buildout/buildout.py", line 357, in install
  File "/tmp/tmp2wqykW/zc.buildout-1.3.0-py2.4.egg/zc/buildout/buildout.py", line 898, in __getitem__
  File "/tmp/tmp2wqykW/zc.buildout-1.3.0-py2.4.egg/zc/buildout/buildout.py", line 982, in _initialize
  File "/home/analyser/site/eggs/plone.recipe.zope2install-3.1-py2.4.egg/plone/recipe/zope2install/__init__.py", line 73, in __init__
    assert self.location or self.svn or self.url
AssertionError
+2  A: 

You need to tell plone.recipe.zope2install where to download Zope. Also, you'll need a zope2instance section, to create a Zope instance for you. These recipes are only needed for Zope up to version 2.11, as of 2.12 Zope has been fully eggified.

Here is a minimal Zope 2.11 buildout.cfg:

[buildout]
parts = instance

[zope2]
recipe = plone.recipe.zope2install
url = http://www.zope.org/Products/Zope/2.11.3/Zope-2.11.3-final.tgz

[instance]
recipe = plone.recipe.zope2instance
zope2-location = ${zope2:location}
user = admin:admin
http-address = 127.0.0.1:8080

Note that the instance part pulls in the zope2 part automatically as it depends on information provided by that part.

As of Zope 2.12 installation is fully egg based. The following sample buildout.cfg is all you need to install the latest beta:

[buildout]
parts = scripts
extends = http://svn.zope.org/*checkout*/Zope/tags/2.12.0b3/versions.cfg

[versions]
Zope2 = 2.12.0b3

[scripts]
recipe = zc.recipe.egg:scripts
eggs = Zope2

Note the extends; it pulls in a list of versions for all Zope2 egg dependencies from the Zope subversion tag for 2.12.0b3, to make sure you get a stable combination of eggs. Without it you may end up with newer egg versions that have introduced incompatibilities.

Martijn Pieters