From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] import: Add PyPI importer. Date: Tue, 30 Sep 2014 09:13:26 +0200 Message-ID: <8761g5eg2x.fsf@gnu.org> References: <8761g8ojde.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <8738bcoj77.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <874mvsg31g.fsf@gnu.org> <87fvfazn4z.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <877g0mzk9y.fsf@gnu.org> <87y4t2knq8.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <871tqtd5dv.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYrct-0005Pt-Nz for guix-devel@gnu.org; Tue, 30 Sep 2014 03:13:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYrcn-0005dT-Oa for guix-devel@gnu.org; Tue, 30 Sep 2014 03:13:35 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:42051) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYrcn-0005VJ-IW for guix-devel@gnu.org; Tue, 30 Sep 2014 03:13:29 -0400 In-Reply-To: <871tqtd5dv.fsf@gmail.com> (Alex Kost's message of "Tue, 30 Sep 2014 09:49:48 +0400") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Alex Kost Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Alex Kost skribis: > David Thompson (2014-09-30 03:31 +0400) wrote: > >> Ludovic Court=C3=A8s writes: >> >>> David Thompson skribis: >>> >>>> Oh yeah, almost forgot about the Automake rule! My autotools skills a= re >>>> weak so I'm not sure how to write this. Could you point me in the rig= ht >>>> direction? >>> >>> In configure.ac, do something like: >>> >>> GUILE_MODULE_AVAILABLE([have_guile_json], [(json)]) >>> AM_CONDITIONAL([HAVE_GUILE_JSON], [text "x$have_guile_json" =3D "xyes= "]) >>> >>> and in Makefile.am: >>> >>> if HAVE_GUILE_JSON >>> TESTS +=3D 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 =E2=80=9CMakefile.am=E2=80=9D like= this: Alternately, we could do this: --=-=-= Content-Type: text/x-patch Content-Disposition: inline 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) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: . So your patch is probably the right way. OK to commit! Ludo=E2=80=99. --=-=-=--