David Thompson (2014-09-30 03:31 +0400) wrote:

> Ludovic Courtès <l...@gnu.org> writes:
>
>> David Thompson <dthomps...@worcester.edu> 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!

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:

>From 85054932667d57224dde1d18c381d7d7c0a95dd4 Mon Sep 17 00:00:00 2001
From: Alex Kost <alez...@gmail.com>
Date: Tue, 30 Sep 2014 09:41:59 +0400
Subject: [PATCH] build: Build pypi modules only if 'guile-json' is available.

* Makefile.am (MODULES): Wrap 'guix/import/pypi.scm' and
  'guix/scripts/import/pypi.scm' in 'if HAVE_GUILE_JSON'.
---
 Makefile.am | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index a1a87c0..eba34af 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -77,7 +77,6 @@ MODULES =					\
   guix/packages.scm				\
   guix/import/utils.scm				\
   guix/import/snix.scm				\
-  guix/import/pypi.scm				\
   guix/scripts/download.scm			\
   guix/scripts/build.scm			\
   guix/scripts/archive.scm			\
@@ -92,7 +91,6 @@ MODULES =					\
   guix/scripts/system.scm			\
   guix/scripts/lint.scm				\
   guix/scripts/import/nix.scm			\
-  guix/scripts/import/pypi.scm			\
   guix.scm					\
   $(GNU_SYSTEM_MODULES)
 
@@ -168,6 +166,10 @@ SCM_TESTS =					\
 
 if HAVE_GUILE_JSON
 
+MODULES +=					\
+  guix/import/pypi.scm				\
+  guix/scripts/import/pypi.scm
+
 SCM_TESTS += tests/pypi.scm
 
 endif
-- 
2.1.0

Reply via email to