From 5e8b9ef8a9f95d8f14b6679431ae7a62367d8053 Mon Sep 17 00:00:00 2001 From: Ashwin Nair Date: Sun, 29 May 2022 11:14:59 +0400 Subject: [PATCH] Add subdirectory reference to locker.py --- src/poetry/packages/locker.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/poetry/packages/locker.py b/src/poetry/packages/locker.py index e57e60b83b7..7cfdcc10c9f 100644 --- a/src/poetry/packages/locker.py +++ b/src/poetry/packages/locker.py @@ -127,6 +127,7 @@ def locked_repository(self) -> Repository: source_url=url, source_reference=source.get("reference"), source_resolved_reference=source.get("resolved_reference"), + source_subdirectory=source.get("subdirectory"), ) package.description = info.get("description", "") package.category = info.get("category", "main") @@ -620,6 +621,9 @@ def _dump_package(self, package: Package) -> dict[str, Any]: if package.source_resolved_reference: data["source"]["resolved_reference"] = package.source_resolved_reference + if package.source_subdirectory: + data["source"]["subdirectory"] = package.source_subdirectory + if package.source_type in ["directory", "git"]: data["develop"] = package.develop