提交 283df0e5 编写于 作者: J Josh Schneier

install -d works on vcs links fix #798 fix #1060

上级 25bd97d7
......@@ -65,6 +65,7 @@ Jonas Nockert <jonasnockert@gmail.com>
Jorge Niedbalski <niedbalski@gmail.com>
Josh Bronson <jabronson@gmail.com>
Josh Hansen <josh@skwash.net>
Josh Schneier <josh.schneier@gmail.com>
Kamal Bin Mustafa <kamal@smach.net>
Kelsey Hightower <kelsey.hightower@gmail.com>
Kenneth Belitzky <kenny@belitzky.com>
......
**1.6.0.dev1 (unreleased)**
* Fixed :issue:`798` and :issue:`1060`. `pip install --download` works with vcs links.
(:pull:`1926`)
* **BACKWARD INCOMPATIBLE** Dropped support for Python 3.1.
......
......@@ -507,11 +507,7 @@ class RequirementSet(object):
# non-editable vcs urls
if is_vcs_url(link):
if only_download:
loc = download_dir
else:
loc = location
unpack_vcs_link(link, loc, only_download)
unpack_vcs_link(link, location, only_download)
# file urls
elif is_file_url(link):
......
......@@ -125,3 +125,17 @@ def test_download_should_skip_existing_files(script):
assert Path('scratch') / 'INITools-0.1.tar.gz' not in result.files_created
assert script.site_packages / 'initools' not in result.files_created
assert script.site_packages / 'openid' not in result.files_created
def test_download_vcs_link(script):
"""
It should allow -d flag for vcs links, regression test for issue #798.
"""
result = script.pip(
'install', '-d', '.', 'git+git://github.com/pypa/pip-test-package.git'
)
assert (
Path('scratch') / 'pip-test-package-0.1.1.zip'
in result.files_created
)
assert script.site_packages / 'piptestpackage' not in result.files_created
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册