使用 zc.buildout,如何从网站安装 tarball?

发布于 2024-08-27 13:22:16 字数 567 浏览 3 评论 0原文

我正在尝试让 zc.buildout 从源代码安装 Gunicorn。使用以下配置:

[gunicorn]
recipe = collective.recipe.distutils
url = http://github.com/benoitc/gunicorn/tarball/master

会导致以下错误:

SystemError: ('Failed', '"/usr/bin/python" setup.py -q install --install-  purelib="/mnt/hgfs/Projects/intranation/parts/site-packages" --install-platlib="/mnt/hgfs/Projects/intranation/parts/site-packages"')

提供 --install-dir--prefix 没有帮助。

zc.buildout 是否有一个方法可以下载 tarball 并通过 easy_install 或类似方式安装它?

I'm trying to get zc.buildout to install Gunicorn from source. Using the following configuration:

[gunicorn]
recipe = collective.recipe.distutils
url = http://github.com/benoitc/gunicorn/tarball/master

results in the following error:

SystemError: ('Failed', '"/usr/bin/python" setup.py -q install --install-  purelib="/mnt/hgfs/Projects/intranation/parts/site-packages" --install-platlib="/mnt/hgfs/Projects/intranation/parts/site-packages"')

Providing a --install-dir or --prefix doesn't help.

Is there a recipe for zc.buildout that downloads a tarball and installs it via easy_install or similar?

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

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

发布评论

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

评论(1

内心激荡 2024-09-03 13:22:16

您可以“直接”安装它。在命令行上,“easy_install http://github.com/benoitc/gunicorn/tarball/master ”工作正常。

相当于 buildout 的是对“gunicorn”的依赖(以便 buildout 尝试安装它)并告诉 buildout 您的 github 链接实际上是 Gunicorn。您可以使用 find-links 来做到这一点:

[buildout]
  find-links =
      http://github.com/benoitc/gunicorn/tarball/master#egg=gunicorn
  parts = console_scripts


  [console_scripts]
  recipe = zc.recipe.egg
  eggs = gunicorn

You can "just" install it. On the command line, "easy_install http://github.com/benoitc/gunicorn/tarball/master" works fine.

The buildout equivalent would be to have a dependency on "gunicorn" (so that buildout attempts installing it) and to tell buildout that your github link is actually gunicorn. You do that with find-links:

[buildout]
  find-links =
      http://github.com/benoitc/gunicorn/tarball/master#egg=gunicorn
  parts = console_scripts


  [console_scripts]
  recipe = zc.recipe.egg
  eggs = gunicorn
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文