diff options
Diffstat (limited to 'dev-python/sh')
-rw-r--r-- | dev-python/sh/Manifest | 6 | ||||
-rw-r--r-- | dev-python/sh/files/sh-1.14.0-fix-sleep-test.patch | 33 | ||||
-rw-r--r-- | dev-python/sh/files/sh-1.14.0-skip-unreliable-test.patch | 8 | ||||
-rw-r--r-- | dev-python/sh/sh-1.12.14.ebuild | 2 | ||||
-rw-r--r-- | dev-python/sh/sh-1.14.0.ebuild | 27 |
5 files changed, 74 insertions, 2 deletions
diff --git a/dev-python/sh/Manifest b/dev-python/sh/Manifest index 014064481227..730a9617e800 100644 --- a/dev-python/sh/Manifest +++ b/dev-python/sh/Manifest @@ -1,5 +1,9 @@ AUX sh-1.12.14-skip-unreliable-test.patch 317 BLAKE2B 3c45673daeec13cbdf851dd97061df85c41783a1b5d760d9d45386b8b4e3f88e25e3f98cbdbce44796e5803614d5474444e554d305089d098fab2cb07075cf71 SHA512 6adc7fd1e2a9f52804272bba1d83eddd6db82b4b67569fc75d169794a19c505d51fd53c949eaabdeb775119a5e3929902c2bbf3883ed299b2de0e4faad597835 AUX sh-1.12.14-tests.patch 1261 BLAKE2B 57c41b50078596998758410f79f0c54458b7884015382f28c82c893223620b42191d19f7fcb4a7065c38e6f2c35ee3e5e3c238667154aa0a2ad3ed6c6e342664 SHA512 e31ef40766e793e1717d15a537a30bf184cdee767d97b06b073074e0545c7d7fbb6a215e21d86ac70e0991a2a4d1bc35165442414ffdea4ece9a7c6a0c73952d +AUX sh-1.14.0-fix-sleep-test.patch 1231 BLAKE2B 290a33009a7046d2a461e623e6e3fd7789ea04a2a54cb086f98bc7fcecddcda6cb3ec3d85429107688ac4d1e5e3dc7555dc924e64241f54fe1875832ce8651dc SHA512 a69ae0ef2b1637cfb579a2c7c4de903f191af9e32f1347add26a2efd32ecb6085799b5cbc96eddaa59d6cb4a9164f61df54b5ec1449b98705fac60526a2b3ff2 +AUX sh-1.14.0-skip-unreliable-test.patch 237 BLAKE2B 55b600d9426f127704cb698bb4df90b103b0ee08d29165f4d45e3fa56f1c0e20d3ab63b404cfa8d2bc372549a77474a2396903081c606516837ff295990eb47d SHA512 632f195df6a85cd65890d093400f4fed099c2344fe4e7f9d46f3decd817405ea587a18b271da3449088cc23519b5f16b30a2030a81d3bfcee30d4d55c591d5fe DIST sh-1.12.14.tar.gz 56861 BLAKE2B dcab86c518fdfdf763053f05a6701fbd0faa76e05d710d6ef709dca89b7527157385ecde355f5f358ba08f7da8e551712732ef43f3074f5568fc7092ed12f014 SHA512 5f2daa2666cf8efe90ba550c8ea5875f2a8812d787597c9d9b933f58feccd192e1ec0ab5695b756bdbfbf9748d106c2045be20838e680b31dac3f778970b5786 -EBUILD sh-1.12.14.ebuild 657 BLAKE2B 608e5bdfb1ff2a4c31931160d2861249b684688cd384dcee1daeb3538a87206acf8a56274318e6f83b5985f9244a989d91d1ae30379da70e9d9754be8b6dd423 SHA512 05c1479352fd063121156970f6acd10ca11769d078843062f7dea928baf359149a934ee200f6cea70f5bfd1da6d584e6a5a05fd3a337473b9cb20159cfdc03d5 +DIST sh-1.14.0.tar.gz 63313 BLAKE2B 9975944455077729d172a34dcf7847930f9bb943d5345729a9c09afeb411de72b59cd5e4f1192406ba8430a26439acd2ee4d477b10f31b5e55be936c711f70a9 SHA512 816c0562f4f779ba79b5206d151893cd5043898d1b74ee109c0ea67f862a097ab9c7509e4a20459fc623f14fa3fb1a9e2a2ccec8257a68fcba14414779a20128 +EBUILD sh-1.12.14.ebuild 664 BLAKE2B 0240a7357f987bfcb30b0c555885f8a47afba39d91127bba53b37e08d4308227d869de89f0d17503379ad2c9414fc0cf499a095474e886ee172e0d0b06855739 SHA512 1947b561b548815bea59f43cff14d10291a0a75cd98793ef3c21583714192b07a19c7a183086d65de3847da7d9838c221d7e8ec04965bfd5c69d15ba670cf220 +EBUILD sh-1.14.0.ebuild 674 BLAKE2B f4ef389f33d613dac307f3e5f7684eec2b1fba7fb7d542f97c46512de7683eabbf038ea0710b23a87da6f55bbbd97b3c6066ed438f477432be74773fe3c8c441 SHA512 98584e699e6983f513045014056e40f97b8bff46ec060400f92f5b324299dc46bdf1719a2d7ebb5c2207737f3468221e134f00ecf511eef3a0e863a3dfe46a69 MISC metadata.xml 676 BLAKE2B 217e170b6b5cbfba2e5029c250dba3927f3cd2b3bbc5111cb5ea459fdcc1bcff0448a8dd2e4e2d8afe42f459e7a485fe4fe04202e9c253bd51f785eec216eb5a SHA512 4d4633de70608259eb2bb288af89992c90fe192258ac157d07f2d568922a88b497cf6a3e2961b266603089e55ce7cfcd7ae2831879ed9afce4c3c740479c2756 diff --git a/dev-python/sh/files/sh-1.14.0-fix-sleep-test.patch b/dev-python/sh/files/sh-1.14.0-fix-sleep-test.patch new file mode 100644 index 000000000000..28d1ec9847fd --- /dev/null +++ b/dev-python/sh/files/sh-1.14.0-fix-sleep-test.patch @@ -0,0 +1,33 @@ +From 83b189de4f461ed0370b0472f1938d3162ed00c7 Mon Sep 17 00:00:00 2001 +From: David Runge <dave@sleepmap.de> +Date: Tue, 1 Sep 2020 23:18:13 +0200 +Subject: [PATCH] Remove hardcoded path for sleep executable + +test.py: +In test_timeout the path for the sleep executable has been hardcoded to +be /bin/sleep. However, on operating systems such as Arch Linux, Fedora +or Solaris the executable resides in /usr/bin/sleep due to a /usr merge +(e.g. see + https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/). +By only checking for the name of the executable and its parameter the +test becomes more generic and thus can run on any (Unix-like) operating +system (given that `sleep` is in PATH). + +Fixes #539 +--- + test.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test.py b/test.py +index f8029c04..142fcc0d 100644 +--- a/test.py ++++ b/test.py +@@ -2014,7 +2014,7 @@ def test_timeout(self): + try: + sh.sleep(sleep_for, _timeout=timeout).wait() + except sh.TimeoutException as e: +- self.assertEqual(e.full_cmd, '/bin/sleep 3') ++ assert 'sleep 3' in e.full_cmd + else: + self.fail("no timeout exception") + elapsed = time() - started diff --git a/dev-python/sh/files/sh-1.14.0-skip-unreliable-test.patch b/dev-python/sh/files/sh-1.14.0-skip-unreliable-test.patch new file mode 100644 index 000000000000..ea79229459ec --- /dev/null +++ b/dev-python/sh/files/sh-1.14.0-skip-unreliable-test.patch @@ -0,0 +1,8 @@ +diff --git a/test.py b/test.py +index a4b9915..fb2ffdd 100644 +--- a/test.py ++++ b/test.py +@@ -2799,2 +2799,3 @@ print("cool") + @requires_progs("lsof") ++ @unittest.skip("Test seems to be unreliable") + def test_no_fd_leak(self): diff --git a/dev-python/sh/sh-1.12.14.ebuild b/dev-python/sh/sh-1.12.14.ebuild index 6278d6e98ad6..57ff7f3454da 100644 --- a/dev-python/sh/sh-1.12.14.ebuild +++ b/dev-python/sh/sh-1.12.14.ebuild @@ -13,7 +13,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" LICENSE="MIT" SLOT="0" -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux" BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" diff --git a/dev-python/sh/sh-1.14.0.ebuild b/dev-python/sh/sh-1.14.0.ebuild new file mode 100644 index 000000000000..1e7ec620c4a5 --- /dev/null +++ b/dev-python/sh/sh-1.14.0.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( pypy3 python3_{6,7,8,9} ) + +inherit distutils-r1 + +DESCRIPTION="Python subprocess interface" +HOMEPAGE="https://github.com/amoffat/sh" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux" + +PATCHES=( + "${FILESDIR}/sh-1.12.14-skip-unreliable-test.patch" + "${FILESDIR}/sh-1.14.0-skip-unreliable-test.patch" + # https://github.com/amoffat/sh/pull/540 + "${FILESDIR}/sh-1.14.0-fix-sleep-test.patch" +) + +python_test() { + "${EPYTHON}" test.py || die "Tests fail with ${EPYTHON}" +} |