diff options
author | Patrick McLean <patrick.mclean@sony.com> | 2020-10-05 14:09:02 -0700 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2020-10-05 14:09:10 -0700 |
commit | dcd74dbc5a2d0886301fda2f1bda6bcf2e795f08 (patch) | |
tree | 1fa58a8579d35ccc19440df12c77f580af80ed24 /app-misc | |
parent | net-misc/dhcpcd: Removed old (diff) | |
download | gentoo-dcd74dbc5a2d0886301fda2f1bda6bcf2e795f08.tar.gz gentoo-dcd74dbc5a2d0886301fda2f1bda6bcf2e795f08.tar.bz2 gentoo-dcd74dbc5a2d0886301fda2f1bda6bcf2e795f08.zip |
app-misc/yq-1.11.1: Version bump
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'app-misc')
-rw-r--r-- | app-misc/yq/Manifest | 1 | ||||
-rw-r--r-- | app-misc/yq/files/yq-2.11.1-tests.patch | 13 | ||||
-rw-r--r-- | app-misc/yq/metadata.xml | 4 | ||||
-rw-r--r-- | app-misc/yq/yq-2.11.1.ebuild | 48 |
4 files changed, 66 insertions, 0 deletions
diff --git a/app-misc/yq/Manifest b/app-misc/yq/Manifest index 2dff83726c56..c8384baa04ad 100644 --- a/app-misc/yq/Manifest +++ b/app-misc/yq/Manifest @@ -1 +1,2 @@ +DIST yq-2.11.1.tar.gz 20660 BLAKE2B 4b51652958121c16462304d21ebe545cca835b6c189a6d7550c7ea0ffc8b7088a02eb61ee412295d85d502a339ec3ccbc67b8dc12cd45a07246cbafa7d7feaf7 SHA512 a59a0b12ac70724bb1b857618a66b8fa38ecd35f37adce0495e74ef194f4547be8adce345f29644d43c3b32c0e680512bfcb527310e17746965f9c1db2b612c1 DIST yq-2.9.2.tar.gz 19177 BLAKE2B 038d813679d3583eb863577f317d834f78f614d6be595c96601a06b40c3af5d9b04234381529012328a45984b183376e0647a6b09b8a87642f8e688e39ec7a7f SHA512 a526407f4f34e9c2a0acccaf38207bbe328468419450efaf30171493123b7715c2e6dd6799679220b07bfa7bc9081ac5f758f833ddf05dfb5e1fe14286baf45c diff --git a/app-misc/yq/files/yq-2.11.1-tests.patch b/app-misc/yq/files/yq-2.11.1-tests.patch new file mode 100644 index 000000000000..6b6231ad7eed --- /dev/null +++ b/app-misc/yq/files/yq-2.11.1-tests.patch @@ -0,0 +1,13 @@ +diff --git a/test/test.py b/test/test.py +index a81f41b..f17f03c 100755 +--- a/test/test.py ++++ b/test/test.py +@@ -84,7 +84,7 @@ class TestYq(unittest.TestCase): + unusable_tty_input = mock.Mock() + unusable_tty_input.isatty = mock.Mock(return_value=True) + +- self.run_yq("{}", [], expect_exit_codes={0} if sys.stdin.isatty() else {2}) ++ self.run_yq("{}", [], expect_exit_codes={0}) + self.run_yq("{}", ["."]) + self.run_yq(unusable_non_tty_input, [".", test_doc]) + self.run_yq(unusable_non_tty_input, [".", test_doc, test_doc]) diff --git a/app-misc/yq/metadata.xml b/app-misc/yq/metadata.xml index 37885efab095..65f1771cc5d9 100644 --- a/app-misc/yq/metadata.xml +++ b/app-misc/yq/metadata.xml @@ -8,4 +8,8 @@ <maintainer type="person"> <email>zmedico@gentoo.org</email> </maintainer> + <maintainer type="person"> + <email>chutzpah@gentoo.org</email> + <name>Patrick McLean</name> + </maintainer> </pkgmetadata> diff --git a/app-misc/yq/yq-2.11.1.ebuild b/app-misc/yq/yq-2.11.1.ebuild new file mode 100644 index 000000000000..8974f0ff6dcf --- /dev/null +++ b/app-misc/yq/yq-2.11.1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6..9} pypy3 ) +DISTUTILS_USE_SETUPTOOLS=rdepend + +inherit distutils-r1 + +DESCRIPTION="Command-line YAML processor - jq wrapper for YAML documents" +HOMEPAGE="https://yq.readthedocs.io/ https://github.com/kislyuk/yq/ https://pypi.org/project/yq/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + app-misc/jq + dev-python/argcomplete[${PYTHON_USEDEP}] + >=dev-python/pyyaml-3.11[${PYTHON_USEDEP}] + dev-python/xmltodict[${PYTHON_USEDEP}] +" +DEPEND="${RDEPEND} + test? ( + dev-python/toml[${PYTHON_USEDEP}] + dev-python/wheel[${PYTHON_USEDEP}] + ) +" + +PATCHES=( + "${FILESDIR}/yq-2.11.1-tests.patch" +) + +python_prepare_all() { + sed -e 's:unittest.main():unittest.main(verbosity=2):' \ + -i test/test.py || die + + sed -r -i 's:[[:space:]]*"coverage",:: ; s:[[:space:]]*"flake8",::' \ + setup.py || die + + distutils-r1_python_prepare_all +} + +python_test() { + "${EPYTHON}" test/test.py </dev/null || die "tests failed under ${EPYTHON}" +} |