zc.recipe.cmmi 中的错误?
如果我在环境中提供一个带有嵌入空间的变量,如下所示:
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是zc.recipe.cmmi的一个缺点;它无法处理没有空格的环境变量。 配方的 bugtracker 中提供了一个补丁。
除了应用补丁之外,我目前不知道解决此问题的方法。您可以使用
collective.recipe.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):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).另一种解决方案是滥用配方的“配置命令”,如下所示:
An alternative solution is to just abuse the recipe's 'configure-command' like so: