[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/14: import: pypi: Display a hint upon "no source release" errors.
From: |
guix-commits |
Subject: |
04/14: import: pypi: Display a hint upon "no source release" errors. |
Date: |
Wed, 2 Feb 2022 12:43:36 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 00762a4c4c8ecdd71cccf6afdd87ae68bf9b4964
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Feb 2 15:55:21 2022 +0100
import: pypi: Display a hint upon "no source release" errors.
Fixes <https://issues.guix.gnu.org/49083>.
* guix/import/pypi.scm (pypi->guix-package): Upon
'missing-source-error?', raise a compound condition with a hint.
---
guix/import/pypi.scm | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index b80f43ac15..e07b792c53 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 David Thompson <davet@gnu.org>
;;; Copyright © 2015 Cyril Roelandt <tipecaml@gmail.com>
-;;; Copyright © 2015, 2016, 2017, 2019, 2020, 2021 Ludovic Courtès
<ludo@gnu.org>
+;;; Copyright © 2015-2017, 2019-2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
@@ -499,8 +499,20 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and
LICENSE."
(and project
(guard (c ((missing-source-error? c)
(let ((package (missing-source-error-package c)))
- (leave (G_ "no source release for pypi package ~a
~a~%")
- (project-info-name info) version))))
+ (raise
+ (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
+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)
+ "?"))))))))))
(make-pypi-sexp (project-info-name info) version
(and=> (source-release project version)
distribution-url)
- branch master updated (4943ac86e4 -> 9408a4edcb), guix-commits, 2022/02/02
- 05/14: gnu: luminance-hdr: Fix compilation., guix-commits, 2022/02/02
- 07/14: gnu: Add python-types-dataclasses., guix-commits, 2022/02/02
- 10/14: gnu: oil: Update to 0.9.7., guix-commits, 2022/02/02
- 08/14: gnu: openttd: Update to 12.1., guix-commits, 2022/02/02
- 11/14: gnu: rr: Update to 5.5.0., guix-commits, 2022/02/02
- 02/14: gnu: perf: Remove input labels., guix-commits, 2022/02/02
- 04/14: import: pypi: Display a hint upon "no source release" errors.,
guix-commits <=
- 06/14: gnu: luminance-hdr: Remove input labels., guix-commits, 2022/02/02
- 01/14: gnu: perf: Help 'perf report --symfs' find separate debug info files., guix-commits, 2022/02/02
- 03/14: import: pypi: Use 'with-error-handling'., guix-commits, 2022/02/02
- 12/14: gnu: cgdb: Update to 0.8.0., guix-commits, 2022/02/02
- 13/14: deploy: Add '--execute'., guix-commits, 2022/02/02
- 09/14: guix system: 'describe' shows the running system, not the current one., guix-commits, 2022/02/02
- 14/14: news: Add entry about 'guix deploy -x'., guix-commits, 2022/02/02