Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use --extra-index-url for resolution #1706

Merged
merged 1 commit into from
Mar 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions pipenv/patched/notpip/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from pip9._vendor.packaging.version import parse as parse_version
from pip9._vendor.packaging.utils import canonicalize_name
from notpip._vendor.packaging import specifiers
from pip9._vendor.requests.exceptions import SSLError
from pip9._vendor.requests.exceptions import SSLError, HTTPError
from pip9._vendor.distlib.compat import unescape


Expand Down Expand Up @@ -602,7 +602,10 @@ def _get_pages(self, locations, project_name):
continue
seen.add(location)

page = self._get_page(location)
try:
page = self._get_page(location)
except HTTPError as e:
page = None
if page is None:
continue

Expand Down
10 changes: 8 additions & 2 deletions pipenv/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,9 +619,15 @@ def convert_deps_to_pip(deps, project=None, r=True, include_index=False):
specs = ''

if include_index:
pip_src_args = []
if 'index' in deps[dep]:
pip_args = prepare_pip_source_args([project.get_source(deps[dep]['index'])])
index = ' '.join(pip_args)
dep_src = [project.get_source(deps[dep]['index'])]
extra_indexes = [src for src in project.sources if src != dep_src]
pip_src_args = dep_src + extra_indexes
else:
pip_src_args = project.sources
pip_args = prepare_pip_source_args(pip_src_args)
index = ' '.join(pip_args)

# Support for version control
maybe_vcs = [vcs for vcs in VCS_LIST if vcs in deps[dep]]
Expand Down