【发布时间】:2011-11-06 07:50:25
【问题描述】:
我正在尝试将 buildout 用于 Python 包,该包在使用时依赖于 2 个扩展模块:dbus-python 和 pygobject。两个模块都使构建失败:dbus-python 缺少一个 setup.py 文件,而 pygobject 有一个但不鼓励使用 -- 取而代之的是 configure, make, make install应该使用。因此,buildout 无法在开发环境中设置这些依赖项。
这是我的buildout.cfg:
[buildout]
develop = .
parts = eggs
[python]
recipe = zc.recipe.eggs
interpreter = python
eggs = foobar
setup.py 包中的foobar 包含:
install_requires=['dbus-python', 'pygobject'],
在寻找解决方案时,我偶然发现了配方 z3c.recipe.scripts 及其 ability to utilize system-wide installed eggs。但是,当应用于我的buildout.cfg ..
[python]
recipe = z3c.recipe.scripts
include-site-packages = true
allowed-eggs-from-site-packages = pygobject, dbus-python
interpreter = python
eggs = foobar
.. 它似乎没有任何效果(仍然失败),尽管两个包(dbus、gobject)都安装在我的系统 Python 中。当我删除 allowed-eggs.. 行时也是如此。
我的问题:我在概念层面上是否有什么问题,还是我的buildout.cfg 有错误?
我知道有zc.recipe.cmmi,这是一个使用configure、make、make install安装鸡蛋的配方。但是,在我的情况下,简单地引用系统 Python 鸡蛋就足够了。我不需要由 buildout 生成的 100% 可重现的环境。另外,dbus-python 和 pygobject 默认安装在大多数 Linux 桌面系统上,即打算使用 foobar 的环境。
【问题讨论】:
标签: python dbus buildout pygobject