Skip to content

Commit a8bf2d3

Browse files
committed
Deprecate setup.py install fallback when wheel package is absent
1 parent 56dcb7f commit a8bf2d3

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/pip/_internal/req/req_install.py

+11
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,17 @@ def install(
811811
install_options = list(install_options) + self.install_options
812812

813813
try:
814+
if self.legacy_install_reason == 8559:
815+
deprecated(
816+
reason=(
817+
f"{self.name} is being installed using the legacy "
818+
f"'setup.py install' method, because the 'wheel' package "
819+
f"is not installed."
820+
),
821+
replacement="to enable the '--use-pep517' option",
822+
gone_in=None,
823+
issue=8559,
824+
)
814825
success = install_legacy(
815826
install_options=install_options,
816827
global_options=global_options,

src/pip/_internal/wheel_builder.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,7 @@ def _should_build(
8686

8787
if not is_wheel_installed():
8888
# we don't build legacy requirements if wheel is not installed
89-
logger.info(
90-
"Using legacy 'setup.py install' for %s, "
91-
"since package 'wheel' is not installed.",
92-
req.name,
93-
)
89+
req.legacy_install_reason = 8559
9490
return False
9591

9692
return True

0 commit comments

Comments
 (0)