本文介绍了pip 忽略 setup.py 中的 dependency_links的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的 setup.py 中有dependency_links:
I have dependency_links in my setup.py:
...
dependency_links = ['http://github.com/robot-republic/python-s3/tarball/master.tar.gz#egg=python-s3'],
...
但它不起作用.但是 install_requires 工作正常.也许还有另一种方法可以根据 setup.py 的要求设置 git repo?
But it doesn't work. However install_requires works fine.Maybe there are another method to set up git repo as required for setup.py?
推荐答案
这个答案 应该会有所帮助.简而言之,您需要为 #egg=python-s3
指定版本(或dev"),使其看起来像 #egg=python-s3-1.0.0代码>.
This answer should help. In a nutshell, you need to specify the version (or "dev") for the #egg=python-s3
so it looks like #egg=python-s3-1.0.0
.
根据@Cerin 的评论更新:
Updates based on @Cerin's comment:
- Pip 1.5.x 有一个标志来启用依赖链接处理:
--process-dependency-links
.我没有测试过,因为我同意下面的观点. - 这个讨论似乎表明使用依赖链接因为 pip 是一种不好的做法.尽管此功能已被弃用,但现在已不再使用.私有包有一个有效的用例.
- Pip 1.5.x has a flag to enable dependency-links processing:
--process-dependency-links
. I haven't tested it because I agree with the point below. - This discussion seems to indicate that using dependency-links for pip is a bad practice. Although this feature was enlisted for deprecation, it's not anymore. There's a valid use case for private packages.
这篇关于pip 忽略 setup.py 中的 dependency_links的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!