[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
195/377: gnu: Add python-commentjson.
From: |
guix-commits |
Subject: |
195/377: gnu: Add python-commentjson. |
Date: |
Thu, 2 Sep 2021 17:55:29 -0400 (EDT) |
raghavgururajan pushed a commit to branch wip-gnome
in repository guix.
commit bf99f80a1688e2139e1893219faa995b136db530
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Tue Aug 24 10:00:53 2021 -0400
gnu: Add python-commentjson.
* gnu/packages/python-xyz.scm (python-commentjson): New variable.
---
gnu/packages/python-xyz.scm | 56 ++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 55 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 59eb473..3215d91 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -53,7 +53,7 @@
;;; Copyright © 2018, 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
-;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2018, 2019, 2020, 2021 Maxim Cournoyer
<maxim.cournoyer@gmail.com>
;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
;;; Copyright © 2015, 2018 Pjotr Prins <pjotr.guix@thebird.nl>
@@ -10134,6 +10134,60 @@ Supported netlink families and protocols include:
(define-public python2-wrapt
(package-with-python2 python-wrapt))
+(define-public python-commentjson
+ (package
+ (name "python-commentjson")
+ (version "0.9.0")
+ (source (origin
+ ;; The PyPI release is missing some test files.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/vaidik/commentjson")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "01iscgrc6bkyrxbzmf46csbf9c0n7g6dygdmxs3fq8fkzrrciybl"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:modules ((guix build python-build-system)
+ (guix build utils)
+ (ice-9 ftw)
+ (ice-9 textual-ports))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'relax-requirements
+ (lambda _
+ (substitute* "setup.py"
+ (("lark-parser>=0.7.1,<0.8.0")
+ "lark-parser>=0.7.1"))))
+ (add-after 'unpack 'delete-unspported-tests
+ ;; Some tests rely on the 'test' module of Python itself,
+ ;; which is not available with the Python package in Guix;
+ ;; remove them.
+ (lambda _
+ ;; XXX: Copied from (guix build dub-build-system).
+ (define (grep string file-name)
+ (string-contains (call-with-input-file file-name get-string-all)
+ string))
+
+ (with-directory-excursion "commentjson/tests/test_json"
+ (let* ((dot? (lambda (x) (member x '("." ".."))))
+ (test-files (scandir "." (negate dot?))))
+ (for-each delete-file
+ (filter (lambda (f) (grep "from test." f))
+ test-files)))))))))
+ (propagated-inputs
+ `(("python-lark-parser" ,python-lark-parser)))
+ (native-inputs
+ `(("python-six" ,python-six)))
+ (home-page "https://github.com/vaidik/commentjson")
+ (synopsis "Python library for adding comments to JSON files")
+ (description "Comment JSON is a Python package that helps you create JSON
+files with Python and JavaScript style inline comments. Its API is very
+similar to the Python standard library's @code{json} module.")
+ (license license:expat)))
+
(define-public python-commonmark
(package
(name "python-commonmark")
- 177/377: gnu: josm: Update to 18118., (continued)
- 177/377: gnu: josm: Update to 18118., guix-commits, 2021/09/02
- 180/377: gnu: opencl-clhpp: Update to 2.0.15., guix-commits, 2021/09/02
- 181/377: gnu: clinfo: Update to 3.0.21.02.21 and simplify package., guix-commits, 2021/09/02
- 186/377: gnu: python-pyopencl: Update to 2021.2.6., guix-commits, 2021/09/02
- 185/377: gnu: python-pytools: Update to 2021.2.7., guix-commits, 2021/09/02
- 187/377: build: Distribute tests/go.scm even when the host lacks guile-lib., guix-commits, 2021/09/02
- 189/377: gnu: Add lsofgraph., guix-commits, 2021/09/02
- 194/377: Migrate to the new 'targets' field of bootloader-configuration., guix-commits, 2021/09/02
- 192/377: gnu: Add emacs-company-org-block., guix-commits, 2021/09/02
- 191/377: zsh completion: Add missing commands and arguments., guix-commits, 2021/09/02
- 195/377: gnu: Add python-commentjson.,
guix-commits <=
- 198/377: gnu: Add python-ncclient., guix-commits, 2021/09/02
- 201/377: gnu: python-execnet: Update to 1.9.0 and enable tests., guix-commits, 2021/09/02
- 206/377: gnu: python-pytest-asyncio: Enable tests and patch for Python 3.8., guix-commits, 2021/09/02
- 203/377: gnu: python-mock: Update description., guix-commits, 2021/09/02
- 208/377: gnu: python-pytest-xdist: Fix by downgrading to 1.34.0, run test suite., guix-commits, 2021/09/02
- 229/377: gnu: scrot: Update to 1.6., guix-commits, 2021/09/02
- 221/377: gnu: Add emacs-helm-xref., guix-commits, 2021/09/02
- 233/377: gnu: Add h-client., guix-commits, 2021/09/02
- 223/377: services: xorg: Delay the xorg-configuration-modules field evaluation., guix-commits, 2021/09/02
- 238/377: gnu: Add python-pytest-console-scripts., guix-commits, 2021/09/02