diff --git a/news/13353.bugfix.rst b/news/13353.bugfix.rst new file mode 100644 index 00000000000..ac5edd07bd3 --- /dev/null +++ b/news/13353.bugfix.rst @@ -0,0 +1 @@ +Fix ``req.source_dir`` AssertionError when using the legacy resolver. diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py index 49b8fd78bef..300ae92b337 100644 --- a/src/pip/_internal/commands/install.py +++ b/src/pip/_internal/commands/install.py @@ -420,7 +420,7 @@ def run(self, options: Values, args: List[str]) -> int: reqs_to_build = [ r - for r in requirement_set.requirements.values() + for r in requirement_set.requirements_to_install if should_build_for_install_command(r) ]