编程语言
首页 > 编程语言> > python – 安装Zope 2最简单的buildout.cfg是什么?

python – 安装Zope 2最简单的buildout.cfg是什么?

作者:互联网

我知道安装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实例.这些食谱仅​​适用于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

请注意,实例部分会自动拉入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

注意延伸;它从Zope subversion标签2.12.0b3中提取所有Zope2蛋依赖性的版本列表,以确保获得稳定的蛋组合.如果没有它,你可能会得到引入不兼容性的新蛋版本.

标签:python,zope,buildout
来源: https://codeday.me/bug/20190522/1151777.html