zc.recipe.cmmi 中的错误?

发布于 2024-11-17 20:37:52 字数 219 浏览 4 评论 0原文

如果我在环境中提供一个带有嵌入空间的变量,如下所示:

environment =
    CPPFLAGS="-D_GNU_SOURCE -I${openssl:location}/include"

我收到此错误:

ValueError:字典更新序列元素 #1 的长度为 1; 2 是必需的

这是一个错误吗?有解决方法吗?

If I provide a variable with an embedded space in the environment as follows:

environment =
    CPPFLAGS="-D_GNU_SOURCE -I${openssl:location}/include"

I get this error:

ValueError: dictionary update sequence element #1 has length 1; 2 is required

Is this a bug? Is there a workaround?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你げ笑在眉眼 2024-11-24 20:37:52

这是zc.recipe.cmmi的一个缺点;它无法处理没有空格的环境变量。 配方的 bugtracker 中提供了一个补丁。

除了应用补丁之外,我目前不知道解决此问题的方法。您可以使用collective.recipe.patch配方在现有鸡蛋上应用补丁,这在这种情况下也应该有效(未经尝试):

[buildout]
parts =
    patch-z.r.cmmi
    yourcmmipart

[patch-z.r.cmmi]
recipe = collective.recipe.patch
egg = zc.recipe.cmmi <= 1.3.4
patch = patches/environ_section_trunk_r101308.patch

这假设您有一个patches suddirectory下载的错误补丁。该部分需要在 cmmi 部分之前列出,以便在该部分之前执行(或者您可以构建依赖项)。

It's a shortcoming in zc.recipe.cmmi; it cannot handle environment variables without spaces. There is a patch available in the bugtracker for the recipe.

I am not currently aware of a workaround for this other than applying the patch. You can apply the patch on existing eggs using the collective.recipe.patch recipe, which should work in this case too (untried):

[buildout]
parts =
    patch-z.r.cmmi
    yourcmmipart

[patch-z.r.cmmi]
recipe = collective.recipe.patch
egg = zc.recipe.cmmi <= 1.3.4
patch = patches/environ_section_trunk_r101308.patch

This assumes you have a patches suddirectory with the patch from the bug downloaded. The part needs to be listed before your cmmi part to be executed before that part (or you can fabricate a dependency).

不爱素颜 2024-11-24 20:37:52

另一种解决方案是滥用配方的“配置命令”,如下所示:

[buildthis]
recipe = zc.recipe.cmmi
...
configure-command =
  export CPPFLAGS="-D_GNU_SOURCE -I${openssl:location}/include";
  ./configure

An alternative solution is to just abuse the recipe's 'configure-command' like so:

[buildthis]
recipe = zc.recipe.cmmi
...
configure-command =
  export CPPFLAGS="-D_GNU_SOURCE -I${openssl:location}/include";
  ./configure
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文