mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-python/sh: bump to 1.14.0, add Python 3.9 support
* Remove explicit setuptools dependency.
* Coverage isn't required any more since
421b262a05
* Backport a test fix.
* Ignore another unreliable test.
Closes: https://bugs.gentoo.org/723574
Package-Manager: Portage-3.0.6, Repoman-3.0.1
Signed-off-by: Louis Sautier <sbraz@gentoo.org>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST sh-1.12.14.tar.gz 56861 BLAKE2B dcab86c518fdfdf763053f05a6701fbd0faa76e05d710d6ef709dca89b7527157385ecde355f5f358ba08f7da8e551712732ef43f3074f5568fc7092ed12f014 SHA512 5f2daa2666cf8efe90ba550c8ea5875f2a8812d787597c9d9b933f58feccd192e1ec0ab5695b756bdbfbf9748d106c2045be20838e680b31dac3f778970b5786
|
||||
DIST sh-1.14.0.tar.gz 63313 BLAKE2B 9975944455077729d172a34dcf7847930f9bb943d5345729a9c09afeb411de72b59cd5e4f1192406ba8430a26439acd2ee4d477b10f31b5e55be936c711f70a9 SHA512 816c0562f4f779ba79b5206d151893cd5043898d1b74ee109c0ea67f862a097ab9c7509e4a20459fc623f14fa3fb1a9e2a2ccec8257a68fcba14414779a20128
|
||||
|
||||
33
dev-python/sh/files/sh-1.14.0-fix-sleep-test.patch
Normal file
33
dev-python/sh/files/sh-1.14.0-fix-sleep-test.patch
Normal file
@@ -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
|
||||
8
dev-python/sh/files/sh-1.14.0-skip-unreliable-test.patch
Normal file
8
dev-python/sh/files/sh-1.14.0-skip-unreliable-test.patch
Normal file
@@ -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):
|
||||
27
dev-python/sh/sh-1.14.0.ebuild
Normal file
27
dev-python/sh/sh-1.14.0.ebuild
Normal file
@@ -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}"
|
||||
}
|
||||
Reference in New Issue
Block a user