mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
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:
@@ -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
@@ -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]]
|
||||
|
||||
Reference in New Issue
Block a user