From ad9ce9714fc78eb1d21051a27850fa190c202243 Mon Sep 17 00:00:00 2001 From: Ashwin Nair Date: Mon, 20 Jun 2022 13:23:17 +0400 Subject: [PATCH] Add subdirectory ref to locker --- 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 285806bac70..91c08c32baf 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