From patchwork Mon Oct 19 18:28:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Baines X-Patchwork-Id: 24694 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2D92C27BBEE; Mon, 19 Oct 2020 19:29:46 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id BD65027BBED for ; Mon, 19 Oct 2020 19:29:45 +0100 (BST) Received: from localhost ([::1]:37706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUZui-0006Fb-T3 for patchwork@mira.cbaines.net; Mon, 19 Oct 2020 14:29:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34334) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUZu3-0005wp-7u for guix-patches@gnu.org; Mon, 19 Oct 2020 14:29:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59019) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kUZu2-0004gw-1C for guix-patches@gnu.org; Mon, 19 Oct 2020 14:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kUZu1-0005AP-Ts for guix-patches@gnu.org; Mon, 19 Oct 2020 14:29:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#44079] [PATCH] gnu: Add python-yq. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 19 Oct 2020 18:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44079 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44079@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160313209619803 (code B ref -1); Mon, 19 Oct 2020 18:29:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 Oct 2020 18:28:16 +0000 Received: from localhost ([127.0.0.1]:42332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUZtI-00059L-2Z for submit@debbugs.gnu.org; Mon, 19 Oct 2020 14:28:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:53288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUZtG-000598-RC for submit@debbugs.gnu.org; Mon, 19 Oct 2020 14:28:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34182) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUZtF-0005aJ-2f for guix-patches@gnu.org; Mon, 19 Oct 2020 14:28:13 -0400 Received: from mira.cbaines.net ([212.71.252.8]:36436) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUZtB-0004ci-D8 for guix-patches@gnu.org; Mon, 19 Oct 2020 14:28:12 -0400 Received: from localhost (188.28.126.178.threembb.co.uk [188.28.126.178]) by mira.cbaines.net (Postfix) with ESMTPSA id 01BB727BBED for ; Mon, 19 Oct 2020 19:28:04 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id e6f66500 for ; Mon, 19 Oct 2020 18:28:02 +0000 (UTC) From: Christopher Baines Date: Mon, 19 Oct 2020 19:28:02 +0100 Message-Id: <20201019182802.23023-1-mail@cbaines.net> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/19 14:28:05 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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"))