[英]Installing a pip package from a local SVN checkout
I have a clone of another python project (that has a setup.py etc.) in my svn repository. 我在我的svn存储库中有另一个python项目(有一个setup.py等)的克隆。 I want to install tell pip to install from this directory. 我想从这个目录安装tell pip来安装。 However it's an internal svn repo and is accessible via the svn://
scheme, not http://
. 然而,它是一个内部的svn repo,可以通过svn://
方案访问,而不是http://
。
I can checkout the directory fine like so svn co svn://172.31.1.3/Development/Common/ThirdParty/Python/package/our-version ./foobar
, then install it with pip: pip install foobar/
, however I can't make it do it all in one go. 我可以很好地检查目录svn co svn://172.31.1.3/Development/Common/ThirdParty/Python/package/our-version ./foobar
,然后用pip安装它: pip install foobar/
,但是我可以'让它一气呵成。
Here is what I've tried and the output: 这是我尝试过的和输出:
pip install svn://172.31.1.3/Development/Common/ThirdParty/Python/package/our-version
...
File ".../virtualenv/lib/python2.5/site-packages/pip-0.7.2-py2.5.egg/pip/vcs/__init__.py", line 110, in get_url_rev
url = self.url.split('+', 1)[1]
IndexError: list index out of range
and 和
pip install svn+svn://172.31.1.3/Development/Common/ThirdParty/Python/package/our-version
...
File "...virtualenv/lib/python2.5/site-packages/distribute-0.6.10-py2.5.egg/pkg_resources.py", line 2424, in scan_list
raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 'svn+svn://172.31.1.3/Development/Common/ThirdParty/Python/package/our-version', 'at', '+svn://172.31.1.3/Development/Common/ThirdParty/Python/package/our-version')
Both of these problems happen with or without #egg=packagename
at the end of the URL (with the same error message). 这两个问题都发生在URL的末尾有或没有#egg=packagename
(具有相同的错误消息)。
and as an editable URL: 并作为可编辑的URL:
pip install -e svn://172.31.1.3/Development/Common/ThirdParty/Python/package/our-version#egg=package
Obtaining package from svn+svn://172.31.1.3/Development/Common/ThirdParty/Python/package/our-version#egg=package
Checking out svn://172.31.1.3/Development/Common/ThirdParty/Python/package/our-version#egg=package to ../virtualenv/src/package
svn: URL 'svn://172.31.1.3/Development/Common/ThirdParty/Python/package/our-version#egg=package' is not properly URI-encoded
So SVN complains if there's a #egg=package
at the end of the url, and if i leave it out, I get this error: 所以SVN抱怨如果在URL的末尾有一个#egg=package
,如果我把它留下,我会收到这个错误:
pip install -e svn://172.31.1.3/Development/Common/ThirdParty/Python/package/our-version
--editable=svn://172.31.1.3/Development/Common/ThirdParty/Python/package/our-version is not the right format; it must have #egg=Package
How do I install a package from an SVN link with pip? 如何使用pip从SVN链接安装软件包?
It is an open bug right now. 这是一个开放的bug现在。 Paul Nasrat is taking a look at it and opened and issue. 保罗·纳斯拉特正在研究它并开启并发布。
Follow the https://github.com/pypa/pip/issues/252 请访问https://github.com/pypa/pip/issues/252
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.