mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-17 04:07:10 -05:00
import: pypi: Return multiple values for unknown packages.
Partly fixes <https://bugs.gnu.org/44115>. * guix/import/pypi.scm (pypi->guix-package): Return two values when PROJECT is false. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
ebb03447f8
commit
434925379d
1 changed files with 29 additions and 27 deletions
|
@ -12,6 +12,7 @@
|
|||
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
|
||||
;;; Copyright © 2021 Marius Bakke <marius@gnu.org>
|
||||
;;; Copyright © 2022 Vivien Kraus <vivien@planete-kraus.eu>
|
||||
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -496,7 +497,7 @@ (define pypi->guix-package
|
|||
(let* ((project (pypi-fetch package-name))
|
||||
(info (and=> project pypi-project-info))
|
||||
(version (or version (and=> project latest-version))))
|
||||
(and project
|
||||
(if project
|
||||
(guard (c ((missing-source-error? c)
|
||||
(let ((package (missing-source-error-package c)))
|
||||
(raise
|
||||
|
@ -525,7 +526,8 @@ (define pypi->guix-package
|
|||
(project-info-summary info)
|
||||
(project-info-summary info)
|
||||
(string->license
|
||||
(project-info-license info)))))))))
|
||||
(project-info-license info))))
|
||||
(values #f '()))))))
|
||||
|
||||
(define* (pypi-recursive-import package-name #:optional version)
|
||||
(recursive-import package-name
|
||||
|
|
Loading…
Reference in a new issue