Alex Kost <alez...@gmail.com> skribis: > 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!
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’.