【发布时间】:2012-10-30 12:50:28
【问题描述】:
根据:
要在 Plone 4.3 中使用 grok-style 声明,必须通过带有 setuptools 额外要求的 buildout 安装 Dexterity : grok 和关系(参考 plone.app.dexterity 的 setup.py 中的extras_require 定义)。但是想要代表最终用户执行此配置的插件开发人员应该怎么做呢?
使用我的 collective.project 插件,我从 plone.app.dexterity 复制了 extras_require:
setup(
author='Alex Clark',
author_email='aclark@aclark.net',
description='Demo app: project management with dexterity content types.',
entry_points={
'z3c.autoinclude.plugin': 'target = plone',
},
extras_require = {
'test': [
'plone.app.testing',
'unittest2'
],
'grok': [
'five.grok',
'plone.directives.dexterity',
'plone.directives.form >=1.1dev',
],
'relations': [
'plone.app.relationfield',
'plone.app.intid',
'z3c.relationfield',
]
},
这允许最终用户安装collective.project 只需添加到鸡蛋列表,例如
[plone]
recipe = plone.recipe.zope2instance
eggs =
Pillow
Plone
collective.project
这是一个合理的方法吗?
【问题讨论】:
-
啊,我自欺欺人了;以上实际上根本不起作用。我会回答这个问题。
标签: plone setuptools buildout dexterity grok