From f021da26f69afc123ee42a2beebec4ae43808771 Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Tue, 6 Mar 2018 15:19:45 -0500 Subject: [PATCH] Fix git+ssh url parsing for requirements - Fixes #1393 --- pipenv/core.py | 4 ++-- pipenv/utils.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pipenv/core.py b/pipenv/core.py index 1c080b04..d75314fb 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -1396,7 +1396,7 @@ def pip_install( # Install dependencies when a package is a VCS dependency. try: - req = get_requirement(package_name.split('--hash')[0].split('--trusted-host')[0]).vcs + req = get_requirement(package_name.split('--hash')[0].split('--trusted-host')[0], verbose=verbose).vcs except (pip._vendor.pyparsing.ParseException, ValueError) as e: click.echo('{0}: {1}'.format(crayons.red('WARNING'), e), err=True) click.echo( @@ -2428,7 +2428,7 @@ def do_clean( installed_package_names = [] for installed in installed_packages: - r = get_requirement(installed) + r = get_requirement(installed, verbose=verbose) # Ignore editable installations. if not r.editable: diff --git a/pipenv/utils.py b/pipenv/utils.py index fd760455..c97494e8 100644 --- a/pipenv/utils.py +++ b/pipenv/utils.py @@ -45,7 +45,7 @@ from contextlib import contextmanager from piptools.resolver import Resolver from piptools.repositories.pypi import PyPIRepository from piptools.scripts.compile import get_pip_command -from piptools import logging +from piptools import logging as piptools_logging from piptools.exceptions import NoCandidateFound from pip.download import is_archive_file from pip.exceptions import DistributionNotFound @@ -140,7 +140,7 @@ def get_requirement(dep): elif req.local_file and path and not req.vcs: req.path = path req.uri = None - elif req.vcs and req.uri and cleaned_uri and uri != req.uri: + elif req.vcs and req.uri and cleaned_uri and cleaned_uri != uri: req.uri = strip_ssh_from_git_uri(req.uri) req.line = strip_ssh_from_git_uri(req.line) req.editable = editable @@ -314,6 +314,7 @@ def actually_resolve_reps(deps, index_lookup, markers_lookup, project, sources, if verbose: logging.log.verbose = True + piptools_logging.log.verbose = True resolved_tree = set()