yq: update to 2.3.6.

This commit is contained in:
maxice8 2018-01-29 20:18:05 -02:00 committed by Leаh Neukirchen
parent 7930e3530d
commit b64cf441fd
2 changed files with 33 additions and 2 deletions

View file

@ -0,0 +1,31 @@
diff --git a/test/test.py b/test/test.py
index 9d06314..04fa59f 100755
--- test/test.py
+++ test/test.py
@@ -3,12 +3,13 @@
from __future__ import absolute_import, division, print_function, unicode_literals
-import os, sys, unittest, tempfile, json, io
+import os, sys, unittest, tempfile, json, io, platform
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from yq import main # noqa
USING_PYTHON2 = True if sys.version_info < (3, 0) else False
+USING_PYPY = True if platform.python_implementation() == "PyPy" else False
class TestYq(unittest.TestCase):
def run_yq(self, input_data, args, expect_exit_code=os.EX_OK):
@@ -45,7 +46,9 @@ def test_yq_arg_passthrough(self):
self.assertEqual(self.run_yq("{}", ["--arg", "foo", "bar", "--arg", "x", "y", "--indent", "4", "."]), "")
self.assertEqual(self.run_yq("{}", ["--arg", "foo", "bar", "--arg", "x", "y", "-y", "--indent", "4", ".x=$x"]),
"x: y\n")
- self.run_yq("{}", ["--indent", "9", "."], expect_exit_code=2)
+ err = "yq: Error running jq: {}Error: [Errno 32] Broken pipe{}".format("IO" if USING_PYTHON2 else "BrokenPipe",
+ ": '<fdopen>'." if USING_PYPY else ".")
+ self.run_yq("{}", ["--indent", "9", "."], expect_exit_code=err)
def fd_path(self, fh):
return "/dev/fd/{}".format(fh.fileno())

View file

@ -1,6 +1,6 @@
# Template file for 'yq'
pkgname=yq
version=2.3.4
version=2.3.6
revision=1
noarch=yes
build_style=python3-module
@ -13,7 +13,7 @@ maintainer="maxice8 <thinkabit.ukim@gmail.com>"
license="Apache-2.0"
homepage="https://github.com/kislyuk/yq"
distfiles="${PYPI_SITE}/y/yq/yq-${version}.tar.gz"
checksum=e8a83765b8ac22479f83db80d161f1d9834c6e6bd07916a339a1221b2bcd9311
checksum=795f79b39e45c26396db73f14c2ab42ae172be6bed95e19b30483f2d34fc425b
do_check() {
python3 test/test.py