From 978d9de0a6f26d53ffc93a54981a322054a37e30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul=20=28ACSONE=29?= Date: Sun, 3 Nov 2019 21:20:22 +0100 Subject: [PATCH] fixup! fixup! Make pip wheel cache what it built --- src/pip/_internal/wheel.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pip/_internal/wheel.py b/src/pip/_internal/wheel.py index 62937eaf0a1..ac4bf029f14 100644 --- a/src/pip/_internal/wheel.py +++ b/src/pip/_internal/wheel.py @@ -1102,7 +1102,7 @@ def build( :param should_unpack: If True, after building the wheel, unpack it and replace the sdist with the unpacked version in preparation for installation. - :return: True if all the wheels built correctly. + :return: The list of InstallRequirement that failed to build. """ # pip install uses should_unpack=True. # pip install never provides a _wheel_dir. @@ -1170,9 +1170,6 @@ def build( python_tag=python_tag, ) if wheel_file: - self.wheel_filenames.append( - os.path.relpath(wheel_file, output_dir) - ) if should_unpack: # XXX: This is mildly duplicative with prepare_files, # but not close enough to pull out to a single common @@ -1198,7 +1195,7 @@ def build( # extract the wheel into the dir unpack_file(req.link.file_path, req.source_dir) else: - # copy from cache to target durectory + # copy from cache to target directory try: ensure_dir(self._wheel_dir) shutil.copy( @@ -1212,6 +1209,9 @@ def build( ) build_failure.append(req) continue + self.wheel_filenames.append( + os.path.relpath(wheel_file, output_dir) + ) build_success.append(req) else: build_failure.append(req)