GNU bug report logs - #44079
[PATCH] gnu: Add python-yq.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Mon, 19 Oct 2020 18:29:01 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 44079 in the body.
You can then email your comments to 44079 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#44079; Package guix-patches. (Mon, 19 Oct 2020 18:29:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Baines <mail <at> cbaines.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 19 Oct 2020 18:29:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add python-yq.
Date: Mon, 19 Oct 2020 19:28:02 +0100
* gnu/packages/python-xyz.scm (python-yq): New variable.
---
 gnu/packages/python-xyz.scm | 41 +++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 575ce40ac8..f256b7e311 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -17347,6 +17347,47 @@ style guide, even if the original code didn't violate the style guide.")
 (define-public python2-yapf
   (package-with-python2 python-yapf))
 
+(define-public python-yq
+  (package
+    (name "python-yq")
+    (version "2.11.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "yq" version))
+       (sha256
+        (base32
+         "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "yq/__init__.py"
+               (("Popen\\(\\[\"jq")
+                (string-append
+                 "Popen([\""
+                 (assoc-ref inputs "jq")
+                 "/bin/jq")))
+             #t)))))
+    (inputs
+     `(("python-argcomplete" ,python-argcomplete)
+       ("python-pyyaml" ,python-pyyaml)
+       ("python-xmltodict" ,python-xmltodict)
+       ("jq" ,jq)))
+    (native-inputs
+     `(("python-coverage" ,python-coverage)
+       ("python-flake8" ,python-flake8)
+       ("python-wheel" ,python-wheel)))
+    (home-page "https://github.com/kislyuk/yq")
+    (synopsis "Command-line YAML/XML processor")
+    (description
+     "This package provides @command{yq} and @command{xq} for processing YAML
+and XML respectively.  The processing is done through @{jq}, @command{jq}
+filters can be used to process the data as it passes through.")
+    (license license:asl2.0)))
+
 (define-public python-gyp
   (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
         (revision "0"))
-- 
2.28.0





Information forwarded to guix-patches <at> gnu.org:
bug#44079; Package guix-patches. (Sat, 24 Oct 2020 09:21:03 GMT) Full text and rfc822 format available.

Message #8 received at 44079 <at> debbugs.gnu.org (full text, mbox):

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 44079 <at> debbugs.gnu.org
Subject: Re: [bug#44079] [PATCH] gnu: Add python-yq.
Date: Sat, 24 Oct 2020 12:19:51 +0300
[Message part 1 (text/plain, inline)]
Hi,

One of my favorites tools, thank you!  :-)


xq and yq work great.

Should we name the package just “yq”, because probably it's used as
end-user program more frequently than a library?  Push in any case ;-)


Oleg.
[signature.asc (application/pgp-signature, inline)]

Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Sat, 24 Oct 2020 19:22:02 GMT) Full text and rfc822 format available.

Notification sent to Christopher Baines <mail <at> cbaines.net>:
bug acknowledged by developer. (Sat, 24 Oct 2020 19:22:02 GMT) Full text and rfc822 format available.

Message #13 received at 44079-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 44079-done <at> debbugs.gnu.org
Subject: Re: [bug#44079] [PATCH] gnu: Add python-yq.
Date: Sat, 24 Oct 2020 20:21:49 +0100
[Message part 1 (text/plain, inline)]
Oleg Pykhalov <go.wigust <at> gmail.com> writes:

> Hi,
>
> One of my favorites tools, thank you!  :-)
>
>
> xq and yq work great.
>
> Should we name the package just “yq”, because probably it's used as
> end-user program more frequently than a library?  Push in any case ;-)

I though about the name, but there's also another incompatible yq tool
[1], so I didn't want to set a precedent that just because this was
packaged first, this gets the name.

1: https://mikefarah.gitbook.io/yq/

I've pushed as python-yq, mostly because I was undecided about renaming
it. Thanks for your review!
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 22 Nov 2020 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 127 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.