如何告诉Buildout从URL (w/o pypi)安装一个鸡蛋

时间:2022-07-07 00:25:18

I have some egg accessible as a URL, say http://myhosting.com/somepkg.egg . Now I don't have this somepkg listed on pypi. How do I tell buildout to fetch and install it for me. I have tried a few recipes but no luck so far.

我有一些可以作为URL访问的鸡蛋,比如http://hostmying.com/somepkg.egg。现在我在pypi上没有列出这个somepkg。如何让buildout为我取回并安装它。我尝试了一些食谱,但到目前为止都没有成功。

TIA

蒂雅

1 个解决方案

#1


5  

You should just be able to add a 'find-links' option to your [buildout] section within the buildout.cfg file. I just tested this internally with the following buildout.cfg.

您应该能够在buildout中向[buildout]部分添加“查找链接”选项。cfg文件。我只是在内部用下面的buildout.cfg测试了它。

[buildout]
find-links  = http://buildslave01/eggs/hostapi.core-1.0_r102-py2.4.egg
parts = mypython

[mypython]
recipe = zc.recipe.egg
interpreter = mypython
eggs = hostapi.core

You can just specify the full path to the egg as the value to 'find-links.' Make sure the egg's 'pyx.y' version matches your local Python version. If they don't match, you'll get a not found error which is slightly misleading.

您可以将鸡蛋的完整路径指定为“查找链接”的值。确定鸡蛋是pyx。y'版本匹配您的本地Python版本。如果它们不匹配,您将得到一个未发现的错误,这有点误导。

#1


5  

You should just be able to add a 'find-links' option to your [buildout] section within the buildout.cfg file. I just tested this internally with the following buildout.cfg.

您应该能够在buildout中向[buildout]部分添加“查找链接”选项。cfg文件。我只是在内部用下面的buildout.cfg测试了它。

[buildout]
find-links  = http://buildslave01/eggs/hostapi.core-1.0_r102-py2.4.egg
parts = mypython

[mypython]
recipe = zc.recipe.egg
interpreter = mypython
eggs = hostapi.core

You can just specify the full path to the egg as the value to 'find-links.' Make sure the egg's 'pyx.y' version matches your local Python version. If they don't match, you'll get a not found error which is slightly misleading.

您可以将鸡蛋的完整路径指定为“查找链接”的值。确定鸡蛋是pyx。y'版本匹配您的本地Python版本。如果它们不匹配,您将得到一个未发现的错误,这有点误导。