1

我正在通过构建为 Z MYSQL 数据库连接安装 ZMYSQLDA。

这是我最初的定义:

parts=
     .....
     zmysqlda


[zmysqlda]
recipe = cns.recipe.zmysqlda
target = ${productdistros:location}

看起来不错,确实构建了实例和站点工作。

有关信息,我已经通过 exe 文件安装了 MySQL_python,因此我可以导入 MySQLdb。

当我在鸡蛋中引入 Products.ZMySQLDA 时,它会尝试获取 MYSQL-python。我不明白为什么,因为它已经安装了。

Buidout日志是

Unused options for buildout: 'eggs' 'download-directory'.
Updating productdistros.
Installing instance.
Getting distribution for 'MySQL-python==1.2.3'.
install_dir C:\Program Files\Plone 404/buildout-cache/eggs\tmparsmo9
error: The system cannot find the file specified
An error occured when trying to install MySQL-python 1.2.3. Look above this mess
age for any errors that were output by easy_install.
While:
  Installing instance.
  Getting distribution for 'MySQL-python==1.2.3'.
Error: Couldn't install: MySQL-python 1.2.3
*************** PICKED VERSIONS ****************
[versions]
collective.saconnect = 1.3
pas.plugins.sqlalchemy = 0.2
products.ploneboard = 2.2
products.ploneboardsubscription = 0.2
products.zmysqlda = 3.1.1
sqlalchemy = 0.6.6

#Required by:
#collective.saconnect 1.3
plone.app.z3cform = 0.5.3

#Required by:
#collective.saconnect 1.3
rwproperty = 1.0

#Required by:
#pas.plugins.sqlalchemy 0.2
z3c.saconfig = 0.12

#Required by:
#pas.plugins.sqlalchemy 0.2
zope.sqlalchemy = 0.6.1
4

1 回答 1

2

它正在尝试安装 mysql-python,因为您已经安装的那个不在 buildout 的 PYTHONPATH 上。

我将从删除[zmysqlda] 部分中的'target='选项开始。这些天你真的不应该把任何东西指向“productdistros”。可能只是 buildout 在'target'中找不到 zmysqlda 的依赖项。如果这不能解决问题,请使用-vv选项重新运行构建并在此处发布结果。

但是,只要您无论如何都在使用 sqlalchemy,为什么不使用与它配合得很好的 SQLAlchemyDA...?然后,您只需将 Products.SQLAlchemyDA(以及 MySql db 适配器 - 我认为您有 sqlalchemy 无论如何)添加到鸡蛋列表中,您不需要任何与 [zmysqlda] 部分相对应的东西。

于 2011-04-06T12:52:11.740 回答