From f06a0cb5609dca79950d0dd73f8042242a800869 Mon Sep 17 00:00:00 2001 From: Paul Moore Date: Wed, 14 Nov 2018 19:24:27 +0000 Subject: [PATCH] Move setup.py egg_info logging into run_egg_info --- src/pip/_internal/req/req_install.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py index ec3b500a1c1..075f86e9b2c 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py @@ -473,16 +473,6 @@ def prepare_metadata(self): Under legacy processing, call setup.py egg-info. """ assert self.source_dir - if self.name: - logger.debug( - 'Running setup.py (path:%s) egg_info for package %s', - self.setup_py, self.name, - ) - else: - logger.debug( - 'Running setup.py (path:%s) egg_info for package from %s', - self.setup_py, self.link, - ) with indent_log(): if self.use_pep517: @@ -536,6 +526,16 @@ def prepare_pep517_metadata(self): self.metadata_directory = os.path.join(metadata_dir, distinfo_dir) def run_egg_info(self): + if self.name: + logger.debug( + 'Running setup.py (path:%s) egg_info for package %s', + self.setup_py, self.name, + ) + else: + logger.debug( + 'Running setup.py (path:%s) egg_info for package from %s', + self.setup_py, self.link, + ) script = SETUPTOOLS_SHIM % self.setup_py base_cmd = [sys.executable, '-c', script] if self.isolated: