1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

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

This commit is contained in:
Josh Schneier 2014-07-15 12:50:11 -04:00
parent 25bd97d78b
commit 283df0e5a2
4 changed files with 18 additions and 5 deletions

View file

@ -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>

View file

@ -1,5 +1,7 @@
**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.

View file

@ -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):

View file

@ -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