Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions rules_poetry/poetry.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ def _impl(repository_ctx):
}
elif "hashes" in metadata: # Poetry 0.x format
hashes = ["sha256:" + h for h in metadata["hashes"]]
elif metadata["lock-version"] in ["2.0"]:
hashes = {}
for package in lockfile["package"]:
key = package["name"]
hashes[key] = [pack["hash"] for pack in package["files"]]
else:
fail("Did not find file hashes in poetry.lock file")

Expand Down