guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] import: Add PyPI importer.


From: Ludovic Courtès
Subject: Re: [PATCH] import: Add PyPI importer.
Date: Tue, 30 Sep 2014 09:13:26 +0200
User-agent: Gnus/5.130011 (Ma Gnus v0.11) Emacs/24.3 (gnu/linux)

Alex Kost <address@hidden> skribis:

> David Thompson (2014-09-30 03:31 +0400) wrote:
>
>> Ludovic Courtès <address@hidden> writes:
>>
>>> David Thompson <address@hidden> skribis:
>>>
>>>> Oh yeah, almost forgot about the Automake rule!  My autotools skills are
>>>> weak so I'm not sure how to write this.  Could you point me in the right
>>>> direction?
>>>
>>> In configure.ac, do something like:
>>>
>>>   GUILE_MODULE_AVAILABLE([have_guile_json], [(json)])
>>>   AM_CONDITIONAL([HAVE_GUILE_JSON], [text "x$have_guile_json" = "xyes"])
>>>
>>> and in Makefile.am:
>>>
>>>   if HAVE_GUILE_JSON
>>>   TESTS += tests/pypi.scm
>>>   endif
>>
>> Done and pushed!  Thanks!

Woo!

> Hello, I don't have guile-json and "make" has failed for me because
> (guix import pypi) wants json module.  Is it required now?
>
> Perhaps it would be safe (?) to adjust “Makefile.am” like this:

Alternately, we could do this:

diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index d0e776e..da8bd04 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -23,7 +23,7 @@
   #:use-module (ice-9 regex)
   #:use-module (srfi srfi-1)
   #:use-module (rnrs bytevectors)
-  #:use-module (json)
+  #:autoload   (json) (json->scm)
   #:use-module (web uri)
   #:use-module (guix utils)
   #:use-module (guix import utils)
That way, the importer would still be compiled (with a warning) and
installed, so that if the user eventually installed guile-json, it will
work.

However, that would fail with old Guile versions:
<http://bugs.gnu.org/12202>.

So your patch is probably the right way.  OK to commit!

Ludo’.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]