import: pypi: do not fail when 'run_requires' is missing from the metadata.
* guix/import/pypi.scm (read-wheel-metadata): do not crash when 'run_requires' is missing from the metadata.
This commit is contained in:
parent
ea92ae01c2
commit
aebd383d04
|
@ -175,8 +175,10 @@ cannot determine package dependencies"))
|
||||||
(lambda (port)
|
(lambda (port)
|
||||||
(let* ((metadata (json->scm port))
|
(let* ((metadata (json->scm port))
|
||||||
(run_requires (hash-ref metadata "run_requires"))
|
(run_requires (hash-ref metadata "run_requires"))
|
||||||
(requirements (hash-ref (list-ref run_requires 0)
|
(requirements (if run_requires
|
||||||
"requires")))
|
(hash-ref (list-ref run_requires 0)
|
||||||
|
"requires")
|
||||||
|
'())))
|
||||||
(map (lambda (r)
|
(map (lambda (r)
|
||||||
(python->package-name (clean-requirement r)))
|
(python->package-name (clean-requirement r)))
|
||||||
requirements)))))
|
requirements)))))
|
||||||
|
|
Loading…
Reference in New Issue