diff options
author | Patrick McLean <patrick.mclean@sony.com> | 2019-03-25 18:51:09 -0700 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2019-03-25 19:32:36 -0700 |
commit | c7a0646691cc170758c473760ae4d53f1f443f90 (patch) | |
tree | 11771701d6eebda2a1931a31b18cbb8f63d420aa /dev-python/PyUtilib | |
parent | dev-util/gcovr: Take maint, drop py3.4, drop old (diff) | |
download | gentoo-c7a0646691cc170758c473760ae4d53f1f443f90.tar.gz gentoo-c7a0646691cc170758c473760ae4d53f1f443f90.tar.bz2 gentoo-c7a0646691cc170758c473760ae4d53f1f443f90.zip |
dev-python/PyUtilib: New package
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-python/PyUtilib')
-rw-r--r-- | dev-python/PyUtilib/Manifest | 1 | ||||
-rw-r--r-- | dev-python/PyUtilib/PyUtilib-5.6.5.ebuild | 51 | ||||
-rw-r--r-- | dev-python/PyUtilib/files/pyutilib-5.6.5-tests.patch | 35 | ||||
-rw-r--r-- | dev-python/PyUtilib/metadata.xml | 13 |
4 files changed, 100 insertions, 0 deletions
diff --git a/dev-python/PyUtilib/Manifest b/dev-python/PyUtilib/Manifest new file mode 100644 index 000000000000..23ea8a4b8141 --- /dev/null +++ b/dev-python/PyUtilib/Manifest @@ -0,0 +1 @@ +DIST PyUtilib-5.6.5.tar.gz 1504220 BLAKE2B 2d00b8b9a0a787413dce5dd4380382efa4c8788e9a8f5188eb0decf9e55bc07ce5ceb8e6f32ed2fa7cf58c331fe936ea07d9b599ff8e7e9593327d3c0f05d4e9 SHA512 5e7f86c29ff81cfffea5862d09ec8d026739f09b172606acd4d08dc4a9bde28c8b63b8e51634d17c3161b46e7e8c8881050044baa22bc07b0926efe46ed7331d diff --git a/dev-python/PyUtilib/PyUtilib-5.6.5.ebuild b/dev-python/PyUtilib/PyUtilib-5.6.5.ebuild new file mode 100644 index 000000000000..0f3cc65d1085 --- /dev/null +++ b/dev-python/PyUtilib/PyUtilib-5.6.5.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_5 python3_6 ) +inherit distutils-r1 + +DESCRIPTION="A collection of Python utilities" +HOMEPAGE="https://github.com/PyUtilib/pyutilib" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" +BDEPEND="${RDEPEND} + test? ( + dev-python/nose[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + )" + +PATCHES=( + "${FILESDIR}/pyutilib-5.6.5-tests.patch" +) + +python_prepare() { + # shells out to run nosetests + rm pyutilib/dev/tests/test_runtests.py || die +} + +python_install_all() { + distutils-r1_python_install_all + find "${ED}" -name '*.pth' -delete || die +} + +python_install() { + distutils-r1_python_install + + if ! python_is_python3; then + printf "# Placeholder for python2\n" \ + > "${D}$(python_get_sitedir)/${PN,,}/__init__.py" + fi +} + +python_test() { + COLUMNS="80" "${EPYTHON}" -W ignore::DeprecationWarning \ + -m unittest discover -v || die +} diff --git a/dev-python/PyUtilib/files/pyutilib-5.6.5-tests.patch b/dev-python/PyUtilib/files/pyutilib-5.6.5-tests.patch new file mode 100644 index 000000000000..780c586759af --- /dev/null +++ b/dev-python/PyUtilib/files/pyutilib-5.6.5-tests.patch @@ -0,0 +1,35 @@ +diff --git a/pyutilib/dev/entry_point.py b/pyutilib/dev/entry_point.py +index e571cc7..e0200e9 100644 +--- a/pyutilib/dev/entry_point.py ++++ b/pyutilib/dev/entry_point.py +@@ -23,7 +23,8 @@ def run_entry_point(package, script, args=[], **kwds): + script = str(script) + assert type(args) is list + cmdLine \ +- = "import pkg_resources,sys; "\ ++ = "import pkg_resources,sys,os; "\ ++ "pkg_resources.fixup_namespace_packages(os.path.join(os.getcwd(),'build')); "\ + "sys.argv=%r; "\ + "sys.exit(pkg_resources.load_entry_point(%r,'console_scripts',%r)())" \ + % ( [script]+args, package, script ) +diff --git a/pyutilib/enum/tests/test_enum.py b/pyutilib/enum/tests/test_enum.py +index 52451ef..66313f4 100755 +--- a/pyutilib/enum/tests/test_enum.py ++++ b/pyutilib/enum/tests/test_enum.py +@@ -11,7 +11,7 @@ + """ Unit test for ‘enum’ module. + """ + +-import unittest ++import unittest, sys + + import pyutilib.enum.enum as enum + +@@ -355,6 +355,7 @@ class Test_EnumValue(unittest.TestCase): + for other_value in self.other_values: + self.assertNotEqual(test_value, other_value) + ++ @unittest.skipIf(sys.hexversion > 0x03040000, "can't compare int and tuple on python3") + def test_sequence_other_values(self): + # An EnumValue should compare sequentially to other values. + test_value = enum.EnumValue(self.SimpleEnum, 0, 'test') diff --git a/dev-python/PyUtilib/metadata.xml b/dev-python/PyUtilib/metadata.xml new file mode 100644 index 000000000000..26c1b264f1f5 --- /dev/null +++ b/dev-python/PyUtilib/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + </maintainer> + <maintainer type="person"> + <email>chutzpah@gentoo.org</email> + <name>Patrick McLean</name> + </maintainer> + <longdescription lang="en"> + </longdescription> +</pkgmetadata> |