5

我知道安装 Zope 的推荐方法是使用 Buildout,但我似乎找不到简单的 buildout.cfg 来安装最小的 Zope 2 环境。有很多安装 Plone 和其他东西。

我试过了:

[buildout]
parts = zope

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

但我得到:

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
4

1 回答 1

5

你需要告诉 plone.recipe.zope2install 在哪里下载 Zope。此外,您需要一个 zope2instance 部分来为您创建一个 Zope 实例。这些配方仅在 Zope 2.11 版本之前需要,从 2.12 开始,Zope 已完全蛋化。

这是一个最小的 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

请注意,零件会自动instance拉入zope2零件,因为它取决于该零件提供的信息。

从 Zope 2.12 开始,安装完全基于鸡蛋。以下示例 buildout.cfg 是安装最新测试版所需的全部内容:

[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

注意扩展;它从 2.12.0b3 的 Zope 颠覆标签中提取所有 Zope2 鸡蛋依赖项的版本列表,以确保您获得稳定的鸡蛋组合。如果没有它,您最终可能会得到引入了不兼容性的更新的鸡蛋版本。

于 2009-07-14T11:50:25.633 回答