Skip to content

Commit 34148bf

Browse files
committed
do not repeat tests in should_cache
1 parent 1283a30 commit 34148bf

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/pip/_internal/wheel.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -815,10 +815,11 @@ def should_cache(
815815
wheel cache, assuming the wheel cache is available, and should_build()
816816
has determined a wheel needs to be built.
817817
"""
818-
if req.editable or not req.source_dir:
819-
return False
820-
821-
if not check_binary_allowed(req):
818+
if not should_build(
819+
req, need_wheel=False, check_binary_allowed=check_binary_allowed
820+
):
821+
# never cache if pip install (need_wheel=False) would not have built
822+
# (editable mode, etc)
822823
return False
823824

824825
if req.link and req.link.is_vcs:

0 commit comments

Comments
 (0)