Skip to content

Commit c74128c

Browse files
authored
Merge pull request pypa#8180 from sbidoul/wheel-absent-warning-sbi
2 parents cbfbc29 + 55d6022 commit c74128c

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

news/8178.bugfix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Avoid unnecessary message about the wheel package not being installed
2+
when a wheel would not have been built. Additionally, clarify the message.

src/pip/_internal/wheel_builder.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,6 @@ def _should_build(
6969
# From this point, this concerns the pip install command only
7070
# (need_wheel=False).
7171

72-
if not req.use_pep517 and not is_wheel_installed():
73-
# we don't build legacy requirements if wheel is not installed
74-
logger.info(
75-
"Could not build wheels for %s, "
76-
"since package 'wheel' is not installed.", req.name,
77-
)
78-
return False
79-
8072
if req.editable or not req.source_dir:
8173
return False
8274

@@ -87,6 +79,14 @@ def _should_build(
8779
)
8880
return False
8981

82+
if not req.use_pep517 and not is_wheel_installed():
83+
# we don't build legacy requirements if wheel is not installed
84+
logger.info(
85+
"Using legacy setup.py install for %s, "
86+
"since package 'wheel' is not installed.", req.name,
87+
)
88+
return False
89+
9090
return True
9191

9292

0 commit comments

Comments
 (0)