Skip to content

Commit 9deead0

Browse files
committed
Don't attempt to build requirements that don't need to be installed
requirements_to_install is scheduled for removal together with the legacy resolver, at which point we should be able to use all requirements returned by resolve() unconditionally.
1 parent c440c47 commit 9deead0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

news/13353.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix ``req.source_dir`` AssertionError when using the legacy resolver.

src/pip/_internal/commands/install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def run(self, options: Values, args: List[str]) -> int:
420420

421421
reqs_to_build = [
422422
r
423-
for r in requirement_set.requirements.values()
423+
for r in requirement_set.requirements_to_install
424424
if should_build_for_install_command(r)
425425
]
426426

0 commit comments

Comments
 (0)