aboutsummaryrefslogtreecommitdiff
path: root/guix/import/pypi.scm
diff options
context:
space:
mode:
authorCyril Roelandt <tipecaml@gmail.com>2016-06-17 14:11:08 +0200
committerCyril Roelandt <tipecaml@gmail.com>2016-06-25 15:33:06 +0200
commitaebd383d04b351465cfb14e4fd0949b67d4b282e (patch)
tree9c667d31be846a6f7a4e073b193f74e784046190 /guix/import/pypi.scm
parentea92ae01c2b9f90ea169acbf4228e9cf100a35b2 (diff)
downloadgnu-guix-aebd383d04b351465cfb14e4fd0949b67d4b282e.tar
gnu-guix-aebd383d04b351465cfb14e4fd0949b67d4b282e.tar.gz
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.
Diffstat (limited to 'guix/import/pypi.scm')
-rw-r--r--guix/import/pypi.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index 70ef507666..efa69081ef 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -175,8 +175,10 @@ cannot determine package dependencies"))
(lambda (port)
(let* ((metadata (json->scm port))
(run_requires (hash-ref metadata "run_requires"))
- (requirements (hash-ref (list-ref run_requires 0)
- "requires")))
+ (requirements (if run_requires
+ (hash-ref (list-ref run_requires 0)
+ "requires")
+ '())))
(map (lambda (r)
(python->package-name (clean-requirement r)))
requirements)))))