summaryrefslogtreecommitdiff
path: root/dev-python/subunit
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/subunit
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/subunit')
-rw-r--r--dev-python/subunit/Manifest6
-rw-r--r--dev-python/subunit/files/1.0.0-tests.patch25
-rw-r--r--dev-python/subunit/metadata.xml15
-rw-r--r--dev-python/subunit/subunit-1.2.0-r1.ebuild94
4 files changed, 140 insertions, 0 deletions
diff --git a/dev-python/subunit/Manifest b/dev-python/subunit/Manifest
new file mode 100644
index 000000000000..641d3c1f8a8d
--- /dev/null
+++ b/dev-python/subunit/Manifest
@@ -0,0 +1,6 @@
+AUX 1.0.0-tests.patch 1058 SHA256 f83089e4cdfcd5a6a3898fb8dd94689808e47a1bb35c3b362cd6e2ccfbf0597b SHA512 b1accf4434415357a8c235c6b660cec440096616887e62fb45a2d15e314a3abb9be825bf4e8ec8d4b18d7ab08197cacd6916bbde87dc5b88c6f3e80ca89b1de0 WHIRLPOOL 2ff71e98fedca6f6cbd32ecd43a5ee0c9f3dfb68701c3a562e600cbc4f57db1a048af81914a66637ef30310e820bf215ea6b1414f46f27d4f896b1acbaac6f57
+DIST subunit-1.2.0.tar.gz 460532 SHA256 27f0561297a7d56d85a8f5491f47e44303d0bb1d99c5627486774ea1bcb3d5c3 SHA512 f6559fd771ad0732985230d11a9a8326ef35c817b62d1f50dc332f0032f7b08559a46d2534983b7d3964e45682ac49b3e348581ee0983861390abcd4ec20459c WHIRLPOOL c30b4a2c9ab17f49f87e206fe5833ae564452b99af447f8c4cbf969b2f2dd96e482fc583e84264be815b051b1bd12e6c132cd779c88d0d68da53956fef0b25b7
+EBUILD subunit-1.2.0-r1.ebuild 2645 SHA256 a86faeb8b8ce788bebd8d5702dd65288919caabf57760120bb965c3afc78fbc7 SHA512 bcf3e0f6bc1734fa40e09b1c991bda4bf0d36289140ee206423331b9aab9595f9df19e2fdff0baa4ab044564bd040dd323841770e09568d777558e30a2d22bde WHIRLPOOL ce4468d2cfe3261749600126b8b60d7305998c453634c0ab2f72185f97fe7aae20016980bfc4414c7756b6906a3934c9f5266b6714f840de8aecb2a2d4040bde
+MISC ChangeLog 7748 SHA256 437a5b8770d0203f1317a5f958b5b790a2fa716368d78bc70c107ccea83ef9af SHA512 0ab69257663d07945b5059e4c7826c63a71f5d92b295455ce5d0528856efe901285371ae43bc790297495367b0249a54573f53e3cd724447af2b457ea22a7c6f WHIRLPOOL 2f6ec1afe46d152c473fd8d3afa6b261d24419ddf1c8a4de0a71de1cb053bdba8752b2b7adaa0d4f63ac86985db1c17d4491f986c41f60ef5048a9ceaf1e581d
+MISC ChangeLog-2015 10090 SHA256 aab220b1396d7407de89fd7827fb07bfb5b8e53de90f992ddcc5f24c84a82c50 SHA512 5f97ce5f3e469281cfe5c2a599d99df091d1ddba16440ab6041793486ee5fec29553414d4e8f1cb56494f60863c7029589fc3148d0be8a48d3688bfcbb463560 WHIRLPOOL 1e75515dafb22185ab88b31a0611adba0f8a169c8bad1c45f4dc1004887143208c0f1cd90d519d6a0c2787f4d9ada6897db046f80e9e202b5f5494004423d81a
+MISC metadata.xml 422 SHA256 e742f3604cece9ae66c902b5f49b2d03a9a73afe2608d609ce83e29a5428c491 SHA512 dcac9ba5ff93016141b433c16b9d1a526ec2babd39721d75a6edd235eb6388500ea8228b6c8c88eacbb12c732c36883c0b698f7039aca7909890fe16cb895cb8 WHIRLPOOL 8ec73b922d152db8ff39aaa3e32a692d9922c53accc6a764fe0ebcff1723751f9ebbdfc56c89044bd08478d2bb546a3d05202f7a9db495ae1f7e7e452887ad8c
diff --git a/dev-python/subunit/files/1.0.0-tests.patch b/dev-python/subunit/files/1.0.0-tests.patch
new file mode 100644
index 000000000000..d83a1900cbe1
--- /dev/null
+++ b/dev-python/subunit/files/1.0.0-tests.patch
@@ -0,0 +1,25 @@
+diff -ur subunit-1.0.0.orig/python/subunit/tests/test_run.py subunit-1.0.0/python/subunit/tests/test_run.py
+--- python/subunit/tests/test_run.py 2014-11-18 16:59:26.000000000 +0800
++++ python/subunit/tests/test_run.py 2015-03-26 13:25:19.193341069 +0800
+@@ -77,21 +77,6 @@
+ exc = self.assertRaises(SystemExit, runner.list, None, loader=loader)
+ self.assertEqual((2,), exc.args)
+
+- class FailingTest(TestCase):
+- def test_fail(self):
+- 1/0
+-
+- def test_exits_zero_when_tests_fail(self):
+- bytestream = io.BytesIO()
+- stream = io.TextIOWrapper(bytestream, encoding="utf8")
+- try:
+- self.assertEqual(None, run.main(
+- argv=["progName", "subunit.tests.test_run.TestSubunitTestRunner.FailingTest"],
+- stdout=stream))
+- except SystemExit:
+- self.fail("SystemExit raised")
+- self.assertThat(bytestream.getvalue(), StartsWith(_b('\xb3')))
+-
+ class ExitingTest(TestCase):
+ def test_exit(self):
+ raise SystemExit(0)
diff --git a/dev-python/subunit/metadata.xml b/dev-python/subunit/metadata.xml
new file mode 100644
index 000000000000..e42cdff158cf
--- /dev/null
+++ b/dev-python/subunit/metadata.xml
@@ -0,0 +1,15 @@
+<?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>
+ <name>Python</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>openstack@gentoo.org</email>
+ <name>Openstack</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="launchpad">subunit</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/subunit/subunit-1.2.0-r1.ebuild b/dev-python/subunit/subunit-1.2.0-r1.ebuild
new file mode 100644
index 000000000000..690b9a8b998e
--- /dev/null
+++ b/dev-python/subunit/subunit-1.2.0-r1.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3 )
+
+inherit distutils-r1 eutils multilib-minimal versionator
+
+DESCRIPTION="A streaming protocol for test results"
+HOMEPAGE="https://launchpad.net/subunit https://pypi.python.org/pypi/python-subunit"
+SRC_URI="https://launchpad.net/${PN}/trunk/$(get_version_component_range 1-2)/+download/${P}.tar.gz"
+
+LICENSE="Apache-2.0 BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"
+IUSE="static-libs test"
+
+RDEPEND="
+ >=dev-python/testtools-0.9.34[${PYTHON_USEDEP}]
+ dev-python/extras[${PYTHON_USEDEP}]
+ dev-lang/perl:=
+"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-libs/check-0.9.11[${MULTILIB_USEDEP}]
+ >=dev-util/cppunit-1.13.2[${MULTILIB_USEDEP}]
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ test? (
+ dev-python/fixtures[${PYTHON_USEDEP}]
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ dev-python/testscenarios[${PYTHON_USEDEP}]
+ )"
+
+# Take out rogue & trivial failing tests that exit the suite before it even gets started
+# The removed class in fact works fine in py3 and fails with py2.7 & pupu
+# The setu to restrict this patch is just those 2 is not worth it.
+PATCHES=( "${FILESDIR}"/1.0.0-tests.patch )
+
+src_prepare() {
+ sed -i -e 's/os.chdir(os.path.dirname(__file__))//' setup.py || die
+
+ # Install perl modules in vendor_perl, bug 534654.
+ export INSTALLDIRS=vendor
+
+ # needed for perl modules
+ distutils-r1_src_prepare
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-shared \
+ $(use_enable static-libs static)
+}
+
+multilib_src_compile() {
+ default
+ multilib_is_native_abi && distutils-r1_src_compile
+}
+
+python_test() {
+ local -x PATH="${PWD}/shell/share:${PATH}"
+ local -x PYTHONPATH=python
+ # Following tests are known to fail in py2.7 & pypy. They pass under py3.
+ # DO NOT re-file
+ # test_add_error test_add_error_details test_add_expected_failure
+ # test_add_expected_failure_details test_add_failure test_add_failure
+ # https://bugs.launchpad.net/subunit/+bug/1436686
+
+ "${PYTHON}" -m testtools.run all_tests.test_suite || die "Testing failed with ${EPYTHON}"
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && distutils-r1_src_test
+}
+
+multilib_src_install() {
+ local targets=(
+ install-include_subunitHEADERS
+ install-pcdataDATA
+ install-exec-local
+ install-libLTLIBRARIES
+ )
+ emake DESTDIR="${D}" "${targets[@]}"
+
+ multilib_is_native_abi && distutils-r1_src_install
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+}