From a239b1e678e0c6b21fa95105546e754e2eff8a5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= Date: Tue, 19 Oct 2021 14:08:52 +0200 Subject: [PATCH] gnu: Add python-ijson. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python-xyz.scm (python-ijson): New variable. Co-authored-by: Ludovic Courtès --- gnu/packages/python-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index bd5a5c2d4a..f12cca9757 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -110,6 +110,7 @@ ;;; Copyright © 2021 Pradana Aumars ;;; Copyright © 2021 Felix Gruber ;;; Copyright © 2021 Sébastien Lerique +;;; Copyright © 2021 Raphaël Mélotte ;;; ;;; This file is part of GNU Guix. ;;; @@ -27606,3 +27607,38 @@ (define-public python-aspectlib code is desired. It includes tools for debugging and testing: simple mock/record and a complete capture/replay framework.") (license license:bsd-2))) + +(define-public python-ijson + (package + (name "python-ijson") + (version "3.1.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "ijson" version)) + (sha256 + (base32 "1sp463ywj4jv5cp6hsv2qwiima30d09xsabxb2dyq5b17jp0640x")))) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; the tests run by the default setup.py require yajl 1.x, + ;; but we have 2.x. yajl 1.x support is going to be removed + ;; anyway, so use pytest to avoid running the yajl1-related + ;; tests. See: https://github.com/ICRAR/ijson/issues/55 + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv"))))))) + (inputs + ;; libyajl is optional, but compiling with it makes faster + ;; backends available to ijson: + `(("libyajl", libyajl))) + (native-inputs + `(("python-pytest", python-pytest))) + (build-system python-build-system) + (home-page "https://github.com/ICRAR/ijson") + (synopsis "Iterative JSON parser with Python iterator interfaces") + (description + "Ijson is an iterative JSON parser with standard Python iterator +interfaces.") + (license license:bsd-3)))