Do not unncessarily warn about wheel being absent
Do not warn about the wheel package being absent
if wheel building would have been skipped for another reason.
@@ -69,14 +69,6 @@ def _should_build(
# From this point, this concerns the pip install command only
# (need_wheel=False).
- if not req.use_pep517 and not is_wheel_installed():
- # we don't build legacy requirements if wheel is not installed
- logger.info(
- "Could not build wheels for %s, "
- "since package 'wheel' is not installed.", req.name,
- )
- return False
-
if req.editable or not req.source_dir:
return False
@@ -87,6 +79,14 @@ def _should_build(
)
return False
+ if not req.use_pep517 and not is_wheel_installed():
+ # we don't build legacy requirements if wheel is not installed
+ logger.info(
+ "Could not build wheels for %s, "
+ "since package 'wheel' is not installed.", req.name,
+ )
+ return False
+
return True
