diff options
| author | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
|---|---|---|
| committer | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
| commit | ecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch) | |
| tree | b89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-python/sh | |
| parent | 1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff) | |
| download | baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip | |
Updating liguros repo
Diffstat (limited to 'dev-python/sh')
| -rw-r--r-- | dev-python/sh/Manifest | 1 | ||||
| -rw-r--r-- | dev-python/sh/files/sh-1.12.14-skip-unreliable-test.patch | 12 | ||||
| -rw-r--r-- | dev-python/sh/files/sh-1.12.14-tests.patch | 43 | ||||
| -rw-r--r-- | dev-python/sh/metadata.xml | 23 | ||||
| -rw-r--r-- | dev-python/sh/sh-1.12.14.ebuild | 29 |
5 files changed, 108 insertions, 0 deletions
diff --git a/dev-python/sh/Manifest b/dev-python/sh/Manifest new file mode 100644 index 000000000000..d7ccff4e55c2 --- /dev/null +++ b/dev-python/sh/Manifest @@ -0,0 +1 @@ +DIST sh-1.12.14.tar.gz 56861 BLAKE2B dcab86c518fdfdf763053f05a6701fbd0faa76e05d710d6ef709dca89b7527157385ecde355f5f358ba08f7da8e551712732ef43f3074f5568fc7092ed12f014 SHA512 5f2daa2666cf8efe90ba550c8ea5875f2a8812d787597c9d9b933f58feccd192e1ec0ab5695b756bdbfbf9748d106c2045be20838e680b31dac3f778970b5786 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 000000000000..aa4f75727a17 --- /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 000000000000..bc3d1b59fef6 --- /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/metadata.xml b/dev-python/sh/metadata.xml new file mode 100644 index 000000000000..2ecfeb186d42 --- /dev/null +++ b/dev-python/sh/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>chutzpah@gentoo.org</email> + <name>Patrick McLean</name> + </maintainer> + <longdescription lang="en"> + sh (previously pbs) is a full-fledged subprocess interface + for Python 2.6 - 3.2 that allows you to call any program + as if it were a function: + + from sh import ifconfig + print ifconfig("eth0") + + sh is not a collection of system commands implemented in Python. +</longdescription> + <upstream> + <remote-id type="pypi">sh</remote-id> + <remote-id type="github">amoffat/sh</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> 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 000000000000..6278d6e98ad6 --- /dev/null +++ b/dev-python/sh/sh-1.12.14.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} pypy3 ) + +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}" +} |
