mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-25 23:41:42 +03:00
fix(fetchPipMetadata): fix requirements...
...using a map() instead of list-comprehension resulted in an iterator which was consumed in the first branch of our dependency tree where it was encountered, resulting in an empty set of requirements in other branches.
This commit is contained in:
parent
b3effffd9a
commit
7416e44047
@ -289,15 +289,15 @@ def lock_file_from_report(report):
|
||||
# packages in the report are a list, so we cache their requirement
|
||||
# strings in a list for faster lookups while we walk the tree below.
|
||||
requirements = dict()
|
||||
|
||||
# iterate over all packages pip installed to find roots
|
||||
# of the tree and gather basic information, such as urls
|
||||
for install in report["install"]:
|
||||
name, package = lock_entry_from_report_entry(install)
|
||||
packages[name] = package
|
||||
requirements[name] = map(
|
||||
Requirement, install["metadata"].get("requires_dist", [])
|
||||
)
|
||||
requirements[name] = [
|
||||
Requirement(r)
|
||||
for r in install["metadata"].get("requires_dist", []) # noqa: 501
|
||||
]
|
||||
if install.get("requested", False):
|
||||
roots[name] = install.get("requested_extras", set())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user