From bec324a194a6caf442d34fbce1e63ae2860f3dbd Mon Sep 17 00:00:00 2001 From: Felipe Arruda Pontes Date: Fri, 17 Feb 2017 01:16:40 -0200 Subject: [PATCH] making pip_download use all available sources by passing the `-i` arg to pip for each source --- pipenv/cli.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pipenv/cli.py b/pipenv/cli.py index 123f1e67..7b3f8fc9 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -565,7 +565,18 @@ def pip_install(package_name=None, r=None, allow_global=False): def pip_download(package_name): - c = delegator.run('{0} download "{1}" -d {2}'.format(which_pip(), package_name, project.download_location)) + for source in project.sources: + c = delegator.run( + '{0} download "{1}" -i {2} -d {3}'.format( + which_pip(), + package_name, + source['url'], + project.download_location + ) + ) + if c.return_code == 0: + break + return c