Skip to content

Commit 670cc63

Browse files
committed
Simplify _should_build
The need_wheel argument is now always False
1 parent 7a2a143 commit 670cc63

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/pip/_internal/wheel_builder.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,26 +43,13 @@ def _contains_egg_info(s: str) -> bool:
4343

4444
def _should_build(
4545
req: InstallRequirement,
46-
need_wheel: bool,
4746
) -> bool:
4847
"""Return whether an InstallRequirement should be built into a wheel."""
4948
assert not req.constraint
5049

5150
if req.is_wheel:
52-
if need_wheel:
53-
logger.info(
54-
"Skipping %s, due to already being wheel.",
55-
req.name,
56-
)
5751
return False
5852

59-
if need_wheel:
60-
# i.e. pip wheel, not pip install
61-
return True
62-
63-
# From this point, this concerns the pip install command only
64-
# (need_wheel=False).
65-
6653
if not req.source_dir:
6754
return False
6855

@@ -76,7 +63,7 @@ def _should_build(
7663
def should_build_for_install_command(
7764
req: InstallRequirement,
7865
) -> bool:
79-
return _should_build(req, need_wheel=False)
66+
return _should_build(req)
8067

8168

8269
def _should_cache(

0 commit comments

Comments
 (0)