Skip to content

Commit 11472e1

Browse files
committed
Switch to install_wheel in InstallRequirement
This removes one of usages of the overloaded `source_dir` member. We know the local_file_path must be set at this point because it is set in the only 3 places that wheels are added to InstallRequirement.
1 parent 327c295 commit 11472e1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/pip/_internal/req/req_install.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
generate_metadata as generate_metadata_legacy
2828
from pip._internal.operations.install.editable_legacy import \
2929
install as install_editable_legacy
30-
from pip._internal.operations.install.wheel import install_unpacked_wheel
30+
from pip._internal.operations.install.wheel import install_wheel
3131
from pip._internal.pyproject import load_pyproject_toml, make_pyproject_path
3232
from pip._internal.req.req_uninstall import UninstallPathSet
3333
from pip._internal.utils.deprecation import deprecated
@@ -774,9 +774,10 @@ def install(
774774
return
775775

776776
if self.is_wheel:
777-
install_unpacked_wheel(
777+
assert self.local_file_path
778+
install_wheel(
778779
self.name,
779-
self.source_dir,
780+
self.local_file_path,
780781
scheme=scheme,
781782
req_description=str(self.req),
782783
pycompile=pycompile,

0 commit comments

Comments
 (0)