[arch-commits] Commit in yq/repos/community-any (3 files)

Daniel M. Capella polyzen at archlinux.org
Sat Feb 29 21:17:36 UTC 2020


    Date: Saturday, February 29, 2020 @ 21:17:36
  Author: polyzen
Revision: 587154

archrelease: copy trunk to community-any

Added:
  yq/repos/community-any/0001-Fix-test_datestimes-for-PyYAML-5.3.patch
    (from rev 587153, yq/trunk/0001-Fix-test_datestimes-for-PyYAML-5.3.patch)
  yq/repos/community-any/PKGBUILD
    (from rev 587153, yq/trunk/PKGBUILD)
Deleted:
  yq/repos/community-any/PKGBUILD

-----------------------------------------------+
 0001-Fix-test_datestimes-for-PyYAML-5.3.patch |   37 +++++++++++++
 PKGBUILD                                      |   68 +++++++++++++-----------
 2 files changed, 75 insertions(+), 30 deletions(-)

Copied: yq/repos/community-any/0001-Fix-test_datestimes-for-PyYAML-5.3.patch (from rev 587153, yq/trunk/0001-Fix-test_datestimes-for-PyYAML-5.3.patch)
===================================================================
--- 0001-Fix-test_datestimes-for-PyYAML-5.3.patch	                        (rev 0)
+++ 0001-Fix-test_datestimes-for-PyYAML-5.3.patch	2020-02-29 21:17:36 UTC (rev 587154)
@@ -0,0 +1,37 @@
+From 57b9698ce56a78c783b5535910e2db81c0cc9e2c Mon Sep 17 00:00:00 2001
+From: "Daniel M. Capella" <polyzen at archlinux.org>
+Date: Sat, 29 Feb 2020 16:10:50 -0500
+Subject: [PATCH] Fix test_datestimes for PyYAML >=5.3
+
+---
+ test/test.py | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/test/test.py b/test/test.py
+index 12fa806..8897196 100755
+--- a/test/test.py
++++ b/test/test.py
+@@ -3,7 +3,7 @@
+ 
+ from __future__ import absolute_import, division, print_function, unicode_literals
+ 
+-import os, sys, unittest, tempfile, json, io, platform, subprocess
++import os, sys, unittest, tempfile, json, io, platform, subprocess, yaml
+ 
+ sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
+ from yq import yq, cli  # noqa
+@@ -116,7 +116,10 @@ class TestYq(unittest.TestCase):
+ 
+     def test_datetimes(self):
+         self.assertEqual(self.run_yq("- 2016-12-20T22:07:36Z\n", ["."]), "")
+-        self.assertEqual(self.run_yq("- 2016-12-20T22:07:36Z\n", ["-y", "."]), "- '2016-12-20T22:07:36'\n")
++        if yaml.__version__ < '5.3':
++            self.assertEqual(self.run_yq("- 2016-12-20T22:07:36Z\n", ["-y", "."]), "- '2016-12-20T22:07:36'\n")
++        else:
++            self.assertEqual(self.run_yq("- 2016-12-20T22:07:36Z\n", ["-y", "."]), "- '2016-12-20T22:07:36+00:00'\n")
+ 
+         self.assertEqual(self.run_yq("2016-12-20", ["."]), "")
+         self.assertEqual(self.run_yq("2016-12-20", ["-y", "."]), "'2016-12-20'\n")
+-- 
+2.25.1
+

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2020-02-29 21:17:14 UTC (rev 587153)
+++ PKGBUILD	2020-02-29 21:17:36 UTC (rev 587154)
@@ -1,30 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Contributor: Caleb Maclennan <caleb at alerque.com>
-
-pkgname=yq
-pkgver=2.9.2
-pkgrel=1
-pkgdesc="Command-line YAML processor - jq wrapper for YAML documents"
-url="https://github.com/kislyuk/yq"
-depends=('jq' 'python-yaml' 'python-xmltodict' 'python-toml')
-makedepends=('python-setuptools')
-checkdepends=('flake8' 'python-coverage' 'python-wheel')
-license=('Apache')
-arch=('any')
-source=("https://files.pythonhosted.org/packages/source/y/$pkgname/$pkgname-$pkgver.tar.gz")
-sha256sums=('9a169c2cbdabf2e3151e7e289ac9aa94ee4284c135eacb630703102d6e321edd')
-
-build() {
-  cd $pkgname-$pkgver
-  python setup.py build
-}
-
-check() {
-  cd $pkgname-$pkgver
-  python test/test.py
-}
-
-package() {
-  cd $pkgname-$pkgver
-  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
-}

Copied: yq/repos/community-any/PKGBUILD (from rev 587153, yq/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-02-29 21:17:36 UTC (rev 587154)
@@ -0,0 +1,38 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Caleb Maclennan <caleb at alerque.com>
+
+pkgname=yq
+pkgver=2.10.0
+pkgrel=1
+pkgdesc="Command-line YAML/XML processor - jq wrapper for YAML/XML documents"
+url="https://github.com/kislyuk/yq"
+depends=('jq' 'python-setuptools' 'python-yaml' 'python-xmltodict'
+         'python-argcomplete')
+checkdepends=('python-toml')
+optdepends=('python-toml')
+license=('Apache')
+arch=('any')
+source=("https://files.pythonhosted.org/packages/source/y/$pkgname/$pkgname-$pkgver.tar.gz"
+        0001-Fix-test_datestimes-for-PyYAML-5.3.patch)
+sha256sums=('abaf2c0728f1c38dee852e976b0a6def5ab660d67430ee5af76b7a37072eba46'
+            '4323f882c110ad4936892e295e634785086839b97730d74f924bc98e547a66cb')
+
+prepare() {
+  cd $pkgname-$pkgver
+  patch --forward --strip=1 --input=../0001-Fix-test_datestimes-for-PyYAML-5.3.patch
+}
+
+build() {
+  cd $pkgname-$pkgver
+  python setup.py build
+}
+
+check() {
+  cd $pkgname-$pkgver
+  python test/test.py
+}
+
+package() {
+  cd $pkgname-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+}



More information about the arch-commits mailing list