* [gentoo-commits] repo/gentoo:master commit in: dev-python/sh/files/, dev-python/sh/
@ 2017-02-03 21:21 Patrick McLean
0 siblings, 0 replies; 3+ messages in thread
From: Patrick McLean @ 2017-02-03 21:21 UTC (permalink / raw
To: gentoo-commits
commit: bb73b416efaeae146ec8ac26dc0a3d7196e5cb5a
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 3 21:21:12 2017 +0000
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Fri Feb 3 21:21:12 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb73b416
dev-python/sh: Version bump to 1.12.9
Gentoo-Bug: 608016
Package-Manager: Portage-2.3.3, Repoman-2.3.1
dev-python/sh/Manifest | 1 +
.../sh/files/sh-1.12.9-python2-unicode-tests.patch | 22 ++++++++++++++++
dev-python/sh/sh-1.12.9.ebuild | 30 ++++++++++++++++++++++
3 files changed, 53 insertions(+)
diff --git a/dev-python/sh/Manifest b/dev-python/sh/Manifest
index 2b4f082..e251953 100644
--- a/dev-python/sh/Manifest
+++ b/dev-python/sh/Manifest
@@ -1 +1,2 @@
DIST sh-1.11.tar.gz 36821 SHA256 590fb9b84abf8b1f560df92d73d87965f1e85c6b8330f8a5f6b336b36f0559a4 SHA512 ccaf178384b5a609c00bb44796a6bec088750414385f19b2d8ffcb93cc8f5ddb6bf82fb966d2bf519651f6efed54258a3c6542a9827d01e6be64af8cb8f86d3d WHIRLPOOL 9d13a3364ec467b492fb5818ae00e3a02f81aa779319382450df76a3041efb047dac82bd249cb51bf819664a5e7a8f9def3a672b8eb2edaa24f2a2aa80d66129
+DIST sh-1.12.9.tar.gz 54077 SHA256 579aa19bae7fe86b607df1afaf4e8537c453d2ce3d84e1d3957e099359a51677 SHA512 378ebfe148de6d1fb0f6488a42a39570f1fde6bb2d3ce40cbe29a6920e102f4c31d38a686663e52b2968099d85a0b5867e112c5d53ca0a4527a2f2bc9e607d35 WHIRLPOOL af177f97f21db7df68a8645fc5da83721ae10961df1ff441a816b028bdd4177b1f197d541c91cb1542c4cedf19eb6bcd1ac0576ccd2cce8ec6d5e0e4e19adbb5
diff --git a/dev-python/sh/files/sh-1.12.9-python2-unicode-tests.patch b/dev-python/sh/files/sh-1.12.9-python2-unicode-tests.patch
new file mode 100644
index 00000000..230b16a
--- /dev/null
+++ b/dev-python/sh/files/sh-1.12.9-python2-unicode-tests.patch
@@ -0,0 +1,22 @@
+diff --git a/test.py b/test.py
+index 78e00ab..0487594 100644
+--- a/test.py
++++ b/test.py
+@@ -502,7 +502,7 @@ for key in osx_cruft:
+ print(os.environ["HERP"] + " " + str(len(os.environ)))
+ """ % osx_cruft)
+ out = python(py.name, _env=env).strip()
+- self.assertEqual(out, "DERP 1")
++ self.assertEqual(out, u"DERP 12")
+
+ py = create_tmp_test("""
+ import os, sys
+@@ -515,7 +515,7 @@ for key in osx_cruft:
+ print(sh.HERP + " " + str(len(os.environ)))
+ """ % osx_cruft)
+ out = python(py.name, _env=env, _cwd=THIS_DIR).strip()
+- self.assertEqual(out, "DERP 1")
++ self.assertEqual(out, u"DERP 12")
+
+
+ def test_which(self):
diff --git a/dev-python/sh/sh-1.12.9.ebuild b/dev-python/sh/sh-1.12.9.ebuild
new file mode 100644
index 00000000..cb70374
--- /dev/null
+++ b/dev-python/sh/sh-1.12.9.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=(python2_7 python3_{4,5} )
+
+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 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]"
+
+PATCHES=(
+ "${FILESDIR}/sh-1.12.9-python2-unicode-tests.patch"
+)
+
+python_test() {
+ ${PYTHON} test.py || die
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/sh/files/, dev-python/sh/
@ 2019-12-06 3:15 Patrick McLean
0 siblings, 0 replies; 3+ messages in thread
From: Patrick McLean @ 2019-12-06 3:15 UTC (permalink / raw
To: gentoo-commits
commit: 0afff5649b7b05804d5d40df60dceec7a78d0f7f
Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Fri Dec 6 03:14:50 2019 +0000
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Fri Dec 6 03:14:50 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0afff564
dev-python/sh-1.12.14: Version bump, add py38, pypy{,3}
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.80, Repoman-2.3.19
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
dev-python/sh/Manifest | 1 +
.../sh/files/sh-1.12.14-skip-unreliable-test.patch | 12 ++++++
dev-python/sh/files/sh-1.12.14-tests.patch | 43 ++++++++++++++++++++++
dev-python/sh/sh-1.12.14.ebuild | 30 +++++++++++++++
4 files changed, 86 insertions(+)
diff --git a/dev-python/sh/Manifest b/dev-python/sh/Manifest
index 8c76a636c80..08b31627e8a 100644
--- a/dev-python/sh/Manifest
+++ b/dev-python/sh/Manifest
@@ -1,2 +1,3 @@
DIST sh-1.11.tar.gz 36821 BLAKE2B 30ac7cdb814b307c810190deea54f819d7ad3d134440040c5e0d1718b970331ec4764665f79784acf40b3905da074c19e9dd0338f7306e07d086a583dd058517 SHA512 ccaf178384b5a609c00bb44796a6bec088750414385f19b2d8ffcb93cc8f5ddb6bf82fb966d2bf519651f6efed54258a3c6542a9827d01e6be64af8cb8f86d3d
+DIST sh-1.12.14.tar.gz 56861 BLAKE2B dcab86c518fdfdf763053f05a6701fbd0faa76e05d710d6ef709dca89b7527157385ecde355f5f358ba08f7da8e551712732ef43f3074f5568fc7092ed12f014 SHA512 5f2daa2666cf8efe90ba550c8ea5875f2a8812d787597c9d9b933f58feccd192e1ec0ab5695b756bdbfbf9748d106c2045be20838e680b31dac3f778970b5786
DIST sh-1.12.9.tar.gz 54077 BLAKE2B 6a63a07fe82479388e5d84655d7a22d01fb2be2cb858884f2f69799aa3390443cbf7e6d42b640be6432239ab5d1a0db0b69f1e39bc3e30719dbba78c6fc8f5f0 SHA512 378ebfe148de6d1fb0f6488a42a39570f1fde6bb2d3ce40cbe29a6920e102f4c31d38a686663e52b2968099d85a0b5867e112c5d53ca0a4527a2f2bc9e607d35
diff --git a/dev-python/sh/files/sh-1.12.14-skip-unreliable-test.patch b/dev-python/sh/files/sh-1.12.14-skip-unreliable-test.patch
new file mode 100644
index 00000000000..aa4f75727a1
--- /dev/null
+++ b/dev-python/sh/files/sh-1.12.14-skip-unreliable-test.patch
@@ -0,0 +1,12 @@
+diff --git a/test.py b/test.py
+index 68ef40c..e5d48da 100644
+--- a/test.py
++++ b/test.py
+@@ -500,2 +500,3 @@ while True:
+
++ @unittest.skip("Test is unreliable")
+ def test_environment(self):
+@@ -587,2 +588,3 @@ exit(2)
+
++ @unittest.skip("Test seems to be unreliable")
+ def test_piped_exception1(self):
diff --git a/dev-python/sh/files/sh-1.12.14-tests.patch b/dev-python/sh/files/sh-1.12.14-tests.patch
new file mode 100644
index 00000000000..bc3d1b59fef
--- /dev/null
+++ b/dev-python/sh/files/sh-1.12.14-tests.patch
@@ -0,0 +1,43 @@
+diff --git a/test.py b/test.py
+index 68ef40c..640e5b5 100644
+--- a/test.py
++++ b/test.py
+@@ -515,6 +515,13 @@ def test_environment(self):
+ "VERSIONER_PYTHON_VERSION",
+ ]
+
++ # On python-3.7+, the changes for no encoding inject LC_CTYPE into subprocesses
++ py37_extra_envvars = [
++ "LC_CTYPE",
++ ]
++
++ prune_envvars = osx_cruft + py37_extra_envvars
++
+ # first we test that the environment exists in our child process as
+ # we've set it
+ py = create_tmp_test("""
+@@ -525,7 +532,7 @@ def test_environment(self):
+ try: del os.environ[key]
+ except: pass
+ print(os.environ["HERP"] + " " + str(len(os.environ)))
+-""" % osx_cruft)
++""" % prune_envvars)
+ out = python(py.name, _env=env).strip()
+ self.assertEqual(out, "DERP 1")
+
+@@ -533,12 +540,12 @@ def test_environment(self):
+ import os, sys
+ sys.path.insert(0, os.getcwd())
+ import sh
+-osx_cruft = %s
+-for key in osx_cruft:
++prune_envvars = %s
++for key in prune_envvars:
+ try: del os.environ[key]
+ except: pass
+ print(sh.HERP + " " + str(len(os.environ)))
+-""" % osx_cruft)
++""" % prune_envvars)
+ out = python(py.name, _env=env, _cwd=THIS_DIR).strip()
+ self.assertEqual(out, "DERP 1")
+
diff --git a/dev-python/sh/sh-1.12.14.ebuild b/dev-python/sh/sh-1.12.14.ebuild
new file mode 100644
index 00000000000..6dbc3e0ccc8
--- /dev/null
+++ b/dev-python/sh/sh-1.12.14.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} pypy{,3} )
+
+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 ~x86 ~amd64-linux ~x86-linux"
+
+BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+
+PATCHES=(
+ "${FILESDIR}/sh-1.12.14-skip-unreliable-test.patch"
+
+ # https://github.com/amoffat/sh/pull/468
+ "${FILESDIR}/sh-1.12.14-tests.patch"
+)
+
+python_test() {
+ "${EPYTHON}" test.py || die "Tests fail with ${EPYTHON}"
+}
+
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/sh/files/, dev-python/sh/
@ 2020-09-13 19:22 Louis Sautier
0 siblings, 0 replies; 3+ messages in thread
From: Louis Sautier @ 2020-09-13 19:22 UTC (permalink / raw
To: gentoo-commits
commit: 836335ea3c18a800dad5ce8d7a1600bb2547b7b6
Author: Louis Sautier <sbraz <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 13 18:56:33 2020 +0000
Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org>
CommitDate: Sun Sep 13 19:21:27 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=836335ea
dev-python/sh: bump to 1.14.0, add Python 3.9 support
* Remove explicit setuptools dependency.
* Coverage isn't required any more since
https://github.com/amoffat/sh/commit/421b262a054ab4882189ece01043d4d6abfe39af
* 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 <AT> gentoo.org>
dev-python/sh/Manifest | 1 +
dev-python/sh/files/sh-1.14.0-fix-sleep-test.patch | 33 ++++++++++++++++++++++
.../sh/files/sh-1.14.0-skip-unreliable-test.patch | 8 ++++++
dev-python/sh/sh-1.14.0.ebuild | 27 ++++++++++++++++++
4 files changed, 69 insertions(+)
diff --git a/dev-python/sh/Manifest b/dev-python/sh/Manifest
index d7ccff4e55c..9b5e5a0e3f3 100644
--- a/dev-python/sh/Manifest
+++ b/dev-python/sh/Manifest
@@ -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
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 00000000000..28d1ec9847f
--- /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 00000000000..ea79229459e
--- /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.14.0.ebuild b/dev-python/sh/sh-1.14.0.ebuild
new file mode 100644
index 00000000000..1e7ec620c4a
--- /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}"
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-13 19:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-13 19:22 [gentoo-commits] repo/gentoo:master commit in: dev-python/sh/files/, dev-python/sh/ Louis Sautier
-- strict thread matches above, loose matches on Subject: below --
2019-12-06 3:15 Patrick McLean
2017-02-03 21:21 Patrick McLean
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox