yq: update to 2.4.1.

This commit is contained in:
maxice8 2018-02-08 03:04:56 -02:00 committed by Michael Aldridge
parent b876303a1d
commit 1bde087d38
2 changed files with 4 additions and 35 deletions

View file

@ -1,31 +0,0 @@
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,19 +1,19 @@
# Template file for 'yq'
pkgname=yq
version=2.3.6
version=2.4.1
revision=1
noarch=yes
build_style=python3-module
hostmakedepends="python3-setuptools"
makedepends="python3-yaml"
checkdepends="jq"
depends="python3 python3-yaml jq"
checkdepends="jq python3-xmltodict"
depends="python3 python3-yaml python3-xmltodict jq"
short_desc="Command-line YAML processor written in Python that wraps around jq"
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=795f79b39e45c26396db73f14c2ab42ae172be6bed95e19b30483f2d34fc425b
checksum=4833d4055b0f1c1f1a2fd292421b3472da39c7dc2727d7819efd11065a5fd310
do_check() {
python3 test/test.py