diff --git a/src/poetry/installation/executor.py b/src/poetry/installation/executor.py index eb7302aa63d..e0adcde994f 100644 --- a/src/poetry/installation/executor.py +++ b/src/poetry/installation/executor.py @@ -569,6 +569,8 @@ def _prepare_archive(self, operation: Install | Update) -> Path: assert package.source_url is not None archive = Path(package.source_url) + if package.source_subdirectory: + archive = archive / package.source_subdirectory if not Path(package.source_url).is_absolute() and package.root_dir: archive = package.root_dir / archive