diff options
author | Cyril Roelandt <tipecaml@gmail.com> | 2016-06-17 14:11:08 +0200 |
---|---|---|
committer | Cyril Roelandt <tipecaml@gmail.com> | 2016-06-25 15:33:06 +0200 |
commit | aebd383d04b351465cfb14e4fd0949b67d4b282e (patch) | |
tree | 9c667d31be846a6f7a4e073b193f74e784046190 | |
parent | ea92ae01c2b9f90ea169acbf4228e9cf100a35b2 (diff) | |
download | 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.
-rw-r--r-- | guix/import/pypi.scm | 6 |
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))))) |