我正在尝试在buildout上创建一个应用程序。我想使用一个包作为buildout的配方,但是buildout找不到最终的配方。
包装名称:MyModule.recipe.mymodule-0.1-py2.7.egg
(在开发鸡蛋中)。
我的食谱是(在包装中):MyModule/recipe/mymodule/__init__.py:Recipe
以下是我的包的根目录中的setup.py
:
#!/usr/bin/python2
from setuptools import setup, find_packages
entry_points = {'zc.buildout': ['default = MyModule.recipe.mymodule:Recipe']}
setup(
name = 'MyModule.recipe.mymodule',
version = '0.1',
author = 'My Name',
author_email = 'my.name@domain.com',
packages = find_packages(),
namespace_packages = ['MyModule', 'MyModule.recipe', 'MyModule.recipe.mymodule'],
include_package_data = True,
install_requires = ['setuptools'],
zip_safe = False,
entry_points = entry_points
)
这是我的包的根目录中的一棵树:
.
├── MyModule
│ ├── __init__.py
│ └── recipe
│ ├── __init__.py
│ └── mymodule
│ └── __init__.py
├── README.txt
└── setup.py
我的buildout配置:
[buildout]
develop +=
develop-eggs/MyModule.recipe.mymodule-0.1-py2.7.egg
parts =
mymodule
[mymodule]
recipe = MyModule.recipe.mymodule:Recipe
engines = ${engines:eggs}
binary = ${buildout:directory}/bin/myexec
Buildout正在返回此错误,这非常令人讨厌:
Installing 'MyModule.recipe.mymodule'.
We have the best distribution that satisfies 'MyModule.recipe.mymodule'.
Picked: MyModule.recipe.mymodule = 0.1
Could't load zc.buildout entry point Recipe
from MyModule.recipe.mymodule:
Entry point ('zc.buildout', 'Recipe') not found.
While:
Installing.
Getting section lgsm.
Initializing section lgsm.
Loading zc.buildout recipe entry MyModule.recipe.mymodule:Recipe.
我尝试将配置设置为recipe=MyModule.recipe.mymodule
,但这也不起作用(同样的错误,使用“默认”而不是“配方”)。你知道如何解决这个问题吗?
注意:我认为我没有合适的关键字来在谷歌上找到我的答案。我在buildout“文档”上搜索了很多,我在plone文档/实现上看了很多。不知道我在哪里可以找到我的答案,所以如果你有关于buildout的真实文档,请告诉我在哪里可以找到它:)