Skip to content

Commit ca23285

Browse files
committed
make wheel download function signatures match
`_download_prebuilt` was returning the wheel filename and a path to where it was unpacked, but `_download_wheel_from_cache` was returning those values in the opposite order. Change the latter to match the former.
1 parent 2a95d94 commit ca23285

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/fromager/bootstrapper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def bootstrap(self, req: Requirement, req_type: RequirementType) -> Version:
129129
# Remember that this is a prebuilt wheel, and where we got it.
130130
source_url_type = str(SourceType.PREBUILT)
131131
else:
132-
unpacked_cached_wheel, cached_wheel_filename = (
132+
cached_wheel_filename, unpacked_cached_wheel = (
133133
self._download_wheel_from_cache(req, resolved_version)
134134
)
135135
source_url_type = sources.get_source_type(self.ctx, req)
@@ -465,12 +465,12 @@ def _download_wheel_from_cache(
465465
archive.extract(zipinfo, unpack_dir)
466466

467467
logger.info("extracted build requirements from wheel")
468-
return unpack_dir / metadata_dir, cached_wheel
468+
return cached_wheel, unpack_dir / metadata_dir
469469
except Exception:
470470
# implies that the wheel server hosted non-fromager built wheels
471471
logger.info("could not extract build requirements from wheel")
472472
shutil.rmtree(unpack_dir)
473-
return None, cached_wheel
473+
return cached_wheel, None
474474
except Exception:
475475
logger.info(
476476
f"did not find wheel for {resolved_version} in {self.cache_wheel_server_url}"

0 commit comments

Comments
 (0)