Skip to content

Commit

Permalink
Use --extra-index-url for resolution
Browse files Browse the repository at this point in the history
- Fixes #1539
- Currently writes the wrong index name to the lockfile
- Currently fails one round before succeeding
  • Loading branch information
techalchemy committed Mar 13, 2018
1 parent e672a80 commit 94db69a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
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

0 comments on commit 94db69a

Please sign in to comment.