From 963e390abe3c7ac00c90a189b3557981e92f5dde Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Thu, 10 Sep 2020 17:21:04 +0530 Subject: [PATCH] Improve how cached wheels are presented This is specifically for the case of look ups done in the new resolver. --- src/pip/_internal/operations/prepare.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pip/_internal/operations/prepare.py b/src/pip/_internal/operations/prepare.py index 95ffec562dc..756adfa43e5 100644 --- a/src/pip/_internal/operations/prepare.py +++ b/src/pip/_internal/operations/prepare.py @@ -374,7 +374,7 @@ def _download_should_save(self): def _log_preparing_link(self, req): # type: (InstallRequirement) -> None """Provide context for the requirement being prepared.""" - if req.link.is_file: + if req.link.is_file and not req.original_link_is_in_wheel_cache: message = "Processing %s" information = str(display_path(req.link.file_path)) else: @@ -383,6 +383,10 @@ def _log_preparing_link(self, req): logger.info(message, information) + if req.original_link_is_in_wheel_cache: + with indent_log(): + logger.info("Using cached %s", req.link.filename) + def _get_download_dir(self, link): # type: (Link) -> Optional[str] if link.is_wheel and self.wheel_download_dir: