我知道推荐的安装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
最佳答案
您需要告诉plone.recipe.zope2install在哪里下载Zope。另外,您将需要一个zope2instance部分,以便为您创建一个Zope实例。从2.12版开始,Zope才完全鸡蛋化,直到2.11版之前的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是安装最新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
注意扩展;它从2.12.0b3的Zope颠覆标签中提取了所有Zope2鸡蛋依赖项的版本列表,以确保获得稳定的鸡蛋组合。没有它,您可能最终会遇到不兼容的较新鸡蛋版本。
关于python - 安装Zope 2的最简单的buildout.cfg是什么?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/1120758/