all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#29847] [PATCH] import: pypi: Stay in the REPL if fail to get a source
@ 2017-12-25 13:46 Oleg Pykhalov
  2017-12-25 13:59 ` ng0
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Oleg Pykhalov @ 2017-12-25 13:46 UTC (permalink / raw)
  To: 29847


[-- Attachment #1.1: Type: text/plain, Size: 138 bytes --]

Hello Guix,

If pypi->guix-package fails to get a source release, could we return
false instead of killing a running Guile REPL session?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: [PATCH] import: pypi: Stay in the REPL if fail to get a source --]
[-- Type: text/x-patch, Size: 1535 bytes --]

From 6bb461018fc4cd47d30ab27b5748b9e4cbce6e97 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Mon, 25 Dec 2017 16:32:14 +0300
Subject: [PATCH] import: pypi: Stay in the REPL if fail to get a source
 release.

* guix/import/pypi.scm (pypi->guix-package): Return #f if no source release.
---
 guix/import/pypi.scm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index bb0db1ba8..3f37ea65f 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -275,9 +275,11 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE."
     (and package
          (guard (c ((missing-source-error? c)
                     (let ((package (missing-source-error-package c)))
-                      (leave (G_ "no source release for pypi package ~a ~a~%")
-                             (assoc-ref* package "info" "name")
-                             (assoc-ref* package "info" "version")))))
+                      (format (current-error-port)
+                              (G_ "no source release for pypi package ~a ~a~%")
+                              (assoc-ref* package "info" "name")
+                              (assoc-ref* package "info" "version"))
+                      #f)))
            (let ((name (assoc-ref* package "info" "name"))
                  (version (assoc-ref* package "info" "version"))
                  (release (assoc-ref (latest-source-release package) "url"))
-- 
2.15.1


[-- Attachment #1.3: Type: text/plain, Size: 15 bytes --]


Thanks,
Oleg.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-04-02 16:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-25 13:46 [bug#29847] [PATCH] import: pypi: Stay in the REPL if fail to get a source Oleg Pykhalov
2017-12-25 13:59 ` ng0
2017-12-25 15:55   ` Oleg Pykhalov
2017-12-25 19:38     ` ng0
2017-12-29 11:14 ` Danny Milosavljevic
2018-01-11 21:39 ` Ludovic Courtès
2018-03-29 13:16   ` Ludovic Courtès
2018-04-01 13:26     ` Oleg Pykhalov
2018-04-02 16:16       ` bug#29847: " Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.