[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/13: import: pypi: Gracefully handle missing project home page.
From: |
guix-commits |
Subject: |
06/13: import: pypi: Gracefully handle missing project home page. |
Date: |
Mon, 7 Mar 2022 16:50:54 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit ebb03447f8cc93b9e070b3e7706d7a64d5d1772c
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Mar 7 22:06:28 2022 +0100
import: pypi: Gracefully handle missing project home page.
Fixes <https://issues.guix.gnu.org/54259>.
Reported by Ricardo Wurmus <rekado@elephly.net>.
* guix/import/pypi.scm (pypi->guix-package): Upon
'missing-source-error?', raise '&fix-hint' only if
'project-info-home-page' returns a non-empty string.
---
guix/import/pypi.scm | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index e07b792c53..edfca3454b 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -500,19 +500,22 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION,
and LICENSE."
(guard (c ((missing-source-error? c)
(let ((package (missing-source-error-package c)))
(raise
- (make-compound-condition
+ (apply
+ make-compound-condition
(formatted-message
(G_ "no source release for pypi package ~a ~a~%")
(project-info-name info) version)
- (condition
- (&fix-hint
- (hint (format #f (G_ "This indicates that the
+ (match (project-info-home-page info)
+ ((or #f "") '())
+ (url
+ (list
+ (condition
+ (&fix-hint
+ (hint (format #f (G_ "This indicates that the
package is available on PyPI, but only as a \"wheel\" containing binaries, not
source. To build it from source, refer to the upstream repository at
@uref{~a}.")
- (or (project-info-home-page info)
- (project-info-url info)
- "?"))))))))))
+ url))))))))))))
(make-pypi-sexp (project-info-name info) version
(and=> (source-release project version)
distribution-url)
- 02/13: gnu: scotch: Explicitly pass "-DINTSIZE" to CMake., (continued)
- 02/13: gnu: scotch: Explicitly pass "-DINTSIZE" to CMake., guix-commits, 2022/03/07
- 03/13: derivations: Coalesce inputs that have the same output path., guix-commits, 2022/03/07
- 04/13: gnu: Add gnusim8085., guix-commits, 2022/03/07
- 10/13: import: cran: Return multiple values for unknown packages., guix-commits, 2022/03/07
- 12/13: import: hackage: Avoid pointless use of 'compose'., guix-commits, 2022/03/07
- 13/13: import: hackage: Use SRFI-71 instead of SRFI-11., guix-commits, 2022/03/07
- 05/13: gnu: Add python-multipart., guix-commits, 2022/03/07
- 07/13: import: pypi: Return multiple values for unknown packages., guix-commits, 2022/03/07
- 08/13: import: hackage: Return multiple values for unknown packages., guix-commits, 2022/03/07
- 11/13: scripts: import: gem: Fix recursive error handling., guix-commits, 2022/03/07
- 06/13: import: pypi: Gracefully handle missing project home page.,
guix-commits <=
- 09/13: import: elpa: Return multiple values for unknown packages., guix-commits, 2022/03/07