我有另外一個Python項目在我的svn存儲庫的克隆(即具有一個setup.py等)PIP封裝。我想安裝告訴pip從這個目錄安裝。然而,這是一個內部svn回購,可通過svn://
方案訪問,而不是http://
。安裝從本地SVN結賬
我可以像svn co svn://172.31.1.3/Development/Common/ThirdParty/Python/package/our-version ./foobar
那樣檢查目錄,然後用pip:pip install foobar/
安裝它,但是我無法一次完成所有工作。
這裏是我試過和輸出:
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
和
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')
這兩個問題發生帶或不帶#egg=packagename
在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
所以SVN笙歌,如果有在網址的結尾#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
如何使用pip從SVN鏈接安裝軟件包?
您的意思是'SVN + ssh'而不是'SVN + svn'的機會呢? – 2011-04-13 12:43:50
你試過了嗎:pip install svn + svn:// fuulpath/repo#egg = packagename?試試吧..如果它不起作用,請在問題跟蹤器中報告。 – 2011-04-13 16:31:32
@Hugo,是的,我試過SVN + SVN:// ...#蛋=軟件包名,相同的 「預期版規範中的」 錯誤 – Rory 2011-04-14 10:42:51