Use --extra-index-url for resolution

- Fixes #1539
- Currently writes the wrong index name to the lockfile
- Currently fails one round before succeeding
This commit is contained in:
Dan Ryan
2018-03-12 23:16:35 -04:00
parent e672a8021b
commit 94db69a0cb
2 changed files with 13 additions and 4 deletions
+5 -2
View File
@@ -34,7 +34,7 @@ from notpip._vendor import html5lib, requests, six
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
@@ -602,7 +602,10 @@ class PackageFinder(object):
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
+8 -2
View File
@@ -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]]