max_rounds

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2017-10-01 06:31:41 -04:00
parent 4980fc2110
commit f3c8b0d71a
2 changed files with 5 additions and 2 deletions
+3
View File
@@ -19,6 +19,9 @@ PIPENV_COLORBLIND = bool(os.environ.get('PIPENV_COLORBLIND'))
# Disable spinner for better test and deploy logs (for the unworthy).
PIPENV_NOSPIN = bool(os.environ.get('PIPENV_NOSPIN'))
# Tells Pipenv how many rounds of resolving to do for Pip-Tools.
PIPENV_MAX_ROUNDS = int(os.environ.get('PIPENV_MAX_ROUNDS', '16'))
# Specify a custom Pipfile location.
PIPENV_PIPFILE = os.environ.get('PIPENV_PIPFILE')
+2 -2
View File
@@ -31,7 +31,7 @@ from pip.exceptions import DistributionNotFound
from requests.exceptions import HTTPError
from .pep508checker import lookup
from .environments import SESSION_IS_INTERACTIVE
from .environments import SESSION_IS_INTERACTIVE, PIPENV_MAX_ROUNDS
specifiers = [k for k in lookup.keys()]
@@ -418,7 +418,7 @@ def resolve_deps(deps, which, which_pip, project, sources=None, verbose=False, p
resolver = Resolver(constraints=constraints, repository=pypi, clear_caches=clear, prereleases=pre)
# pre-resolve instead of iterating to avoid asking pypi for hashes of editable packages
try:
resolved_tree.update(resolver.resolve())
resolved_tree.update(resolver.resolve(max_rounds=PIPENV_MAX_ROUNDS))
except (NoCandidateFound, DistributionNotFound, HTTPError) as e:
click.echo(
'{0}: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.\n '