summaryrefslogtreecommitdiff
path: root/dev-python/python-subunit
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/python-subunit')
-rw-r--r--dev-python/python-subunit/Manifest3
-rw-r--r--dev-python/python-subunit/files/subunit-1.4.0-werror.patch34
-rw-r--r--dev-python/python-subunit/files/subunit-1.4.5-testtools-2.8.patch46
-rw-r--r--dev-python/python-subunit/metadata.xml16
-rw-r--r--dev-python/python-subunit/python-subunit-1.4.4-r1.ebuild94
-rw-r--r--dev-python/python-subunit/python-subunit-1.4.5-r1.ebuild97
-rw-r--r--dev-python/python-subunit/python-subunit-1.4.6.ebuild95
7 files changed, 385 insertions, 0 deletions
diff --git a/dev-python/python-subunit/Manifest b/dev-python/python-subunit/Manifest
new file mode 100644
index 000000000000..da721f275585
--- /dev/null
+++ b/dev-python/python-subunit/Manifest
@@ -0,0 +1,3 @@
+DIST subunit-1.4.4.gh.tar.gz 105357 BLAKE2B 5937c62357d9cb70e25242aa7678d89f79fed3d8d28fb5306bc21e28d643665e563078a84a9dd64b9192809e542d69218154227c8e5d281c861085d3175c73c4 SHA512 a666e45951afab70ea85cf9614d5e60c8884c0e2d7987e690bf7acedec5c544c412407b02134a125b4dca8772c0b1ce17fdbd9546d97ef06592119ec49b2a21f
+DIST subunit-1.4.5.gh.tar.gz 105136 BLAKE2B 59ed96bbc07e0cb571aa18720012d43e260a442e7d650eadc756510c7bfbeeff756371345801c8939a2a63740f11f86d0cb1f6c3b6045142fe63e547566e9d37 SHA512 2726b175d8386302ac3f736a69363dec039b4163d423aa4a3a5480b115aa518cc3bf5efee8c0176cf7d1cd2453f8e6531253709c9e7eda7fc0f48b3d3a6c7106
+DIST subunit-1.4.6.gh.tar.gz 120837 BLAKE2B 03c3d6efa01ec285543fc38f241e517d3b10096d39078373be108c3a01c038d85f20df44650fcd1374ebd90bd9e4eae509d86d517a952c05c1ab256f286a3090 SHA512 23c96b46908c24fbf455ea67c87b1374b157190b76b1fe3875d23364b17922e30dd29e64e9c779d9440630d28e749de7c40d45bcd16b77304aa6df6f54c0a05d
diff --git a/dev-python/python-subunit/files/subunit-1.4.0-werror.patch b/dev-python/python-subunit/files/subunit-1.4.0-werror.patch
new file mode 100644
index 000000000000..e64f74a655ef
--- /dev/null
+++ b/dev-python/python-subunit/files/subunit-1.4.0-werror.patch
@@ -0,0 +1,34 @@
+# https://bugs.gentoo.org/744313
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -4,11 +4,11 @@
+ m4_define([SUBUNIT_VERSION],
+ m4_defn([SUBUNIT_MAJOR_VERSION]).m4_defn([SUBUNIT_MINOR_VERSION]).m4_defn([SUBUNIT_MICRO_VERSION]))
+ AC_PREREQ([2.59])
+ AC_INIT([subunit], [SUBUNIT_VERSION], [subunit-dev@lists.launchpad.net])
+ AC_CONFIG_SRCDIR([c/lib/child.c])
+-AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
++AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
+ AC_CONFIG_MACRO_DIR([m4])
+ [SUBUNIT_MAJOR_VERSION]=SUBUNIT_MAJOR_VERSION
+ [SUBUNIT_MINOR_VERSION]=SUBUNIT_MINOR_VERSION
+ [SUBUNIT_MICRO_VERSION]=SUBUNIT_MICRO_VERSION
+ [SUBUNIT_VERSION]=SUBUNIT_VERSION
+@@ -26,14 +26,14 @@
+ AC_PROG_LIBTOOL
+ AM_PATH_PYTHON
+
+ AS_IF([test "$GCC" = "yes"],
+ [
+- SUBUNIT_CFLAGS="-Wall -Werror -Wextra -Wstrict-prototypes "
++ SUBUNIT_CFLAGS="-Wall -Wextra -Wstrict-prototypes "
+ SUBUNIT_CFLAGS="$SUBUNIT_CFLAGS -Wmissing-prototypes -Wwrite-strings "
+ SUBUNIT_CFLAGS="$SUBUNIT_CFLAGS -Wno-variadic-macros "
+- SUBUNIT_CXXFLAGS="-Wall -Werror -Wextra -Wwrite-strings -Wno-variadic-macros"
++ SUBUNIT_CXXFLAGS="-Wall -Wextra -Wwrite-strings -Wno-variadic-macros"
+ ])
+
+ AM_CFLAGS="$SUBUNIT_CFLAGS -I\$(top_srcdir)/c/include"
+ AM_CXXFLAGS="$SUBUNIT_CXXFLAGS -I\$(top_srcdir)/c/include"
+ AC_SUBST(AM_CFLAGS)
diff --git a/dev-python/python-subunit/files/subunit-1.4.5-testtools-2.8.patch b/dev-python/python-subunit/files/subunit-1.4.5-testtools-2.8.patch
new file mode 100644
index 000000000000..5e1161567860
--- /dev/null
+++ b/dev-python/python-subunit/files/subunit-1.4.5-testtools-2.8.patch
@@ -0,0 +1,46 @@
+From a72e9c343bd369cf840b29e074417fed5d05d59c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= <jelmer@jelmer.uk>
+Date: Mon, 22 Dec 2025 11:05:54 +0000
+Subject: [PATCH] Fix compatibility with testtools 2.8.2
+
+LP: #2136951
+---
+ python/subunit/tests/test_test_protocol2.py | 17 ++++++++++++-----
+ 1 file changed, 12 insertions(+), 5 deletions(-)
+
+diff --git a/python/subunit/tests/test_test_protocol2.py b/python/subunit/tests/test_test_protocol2.py
+index 6d1e03b..2874e43 100644
+--- a/python/subunit/tests/test_test_protocol2.py
++++ b/python/subunit/tests/test_test_protocol2.py
+@@ -30,7 +30,12 @@ except ImportError:
+ from testtools import TestCase
+ from testtools.matchers import Contains, HasLength
+ from testtools.testresult.doubles import StreamResult
+-from testtools.tests.test_testresult import TestStreamResultContract
++
++try:
++ from testtools.tests.test_testresult import TestStreamResultContract
++except ImportError:
++ # testtools >= 2.8 no longer includes the tests submodule
++ TestStreamResultContract = None
+
+ import subunit
+ import iso8601
+@@ -54,11 +59,13 @@ CONSTANT_TAGS = [
+ ]
+
+
+-class TestStreamResultToBytesContract(TestCase, TestStreamResultContract):
+- """Check that StreamResult behaves as testtools expects."""
++if TestStreamResultContract is not None:
+
+- def _make_result(self):
+- return subunit.StreamResultToBytes(BytesIO())
++ class TestStreamResultToBytesContract(TestCase, TestStreamResultContract):
++ """Check that StreamResult behaves as testtools expects."""
++
++ def _make_result(self):
++ return subunit.StreamResultToBytes(BytesIO())
+
+
+ class TestStreamResultToBytes(TestCase):
diff --git a/dev-python/python-subunit/metadata.xml b/dev-python/python-subunit/metadata.xml
new file mode 100644
index 000000000000..77109626d9cc
--- /dev/null
+++ b/dev-python/python-subunit/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/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>
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>
diff --git a/dev-python/python-subunit/python-subunit-1.4.4-r1.ebuild b/dev-python/python-subunit/python-subunit-1.4.4-r1.ebuild
new file mode 100644
index 000000000000..bdbb5a98ac89
--- /dev/null
+++ b/dev-python/python-subunit/python-subunit-1.4.4-r1.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 multilib-minimal autotools
+
+MY_P=subunit-${PV}
+DESCRIPTION="A streaming protocol for test results"
+HOMEPAGE="
+ https://launchpad.net/subunit/
+ https://pypi.org/project/python-subunit/
+"
+SRC_URI="
+ https://github.com/testing-cabal/subunit/archive/${PV}.tar.gz
+ -> ${MY_P}.gh.tar.gz
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="Apache-2.0 BSD"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
+IUSE="static-libs test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-python/testtools-0.9.34[${PYTHON_USEDEP}]
+ dev-python/iso8601[${PYTHON_USEDEP}]
+"
+DEPEND="
+ ${RDEPEND}
+ >=dev-libs/check-0.9.11[${MULTILIB_USEDEP}]
+ >=dev-util/cppunit-1.13.2[${MULTILIB_USEDEP}]
+ >=virtual/pkgconfig-0-r1
+ test? (
+ dev-python/fixtures[${PYTHON_USEDEP}]
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ dev-python/testscenarios[${PYTHON_USEDEP}]
+ <dev-python/testtools-2.8[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/subunit-1.4.0-werror.patch"
+)
+
+src_prepare() {
+ mv all_tests.py python/ || die
+
+ distutils-r1_src_prepare
+ eautoreconf
+ 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() {
+ cd python || die
+ "${EPYTHON}" -m testtools.run -v 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-libLTLIBRARIES
+ )
+ emake DESTDIR="${D}" "${targets[@]}"
+
+ multilib_is_native_abi && distutils-r1_src_install
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ find "${D}" -name '*.la' -delete || die
+}
diff --git a/dev-python/python-subunit/python-subunit-1.4.5-r1.ebuild b/dev-python/python-subunit/python-subunit-1.4.5-r1.ebuild
new file mode 100644
index 000000000000..5393f9181560
--- /dev/null
+++ b/dev-python/python-subunit/python-subunit-1.4.5-r1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 multilib-minimal autotools
+
+MY_P=subunit-${PV}
+DESCRIPTION="A streaming protocol for test results"
+HOMEPAGE="
+ https://launchpad.net/subunit/
+ https://github.com/testing-cabal/subunit/
+ https://pypi.org/project/python-subunit/
+"
+SRC_URI="
+ https://github.com/testing-cabal/subunit/archive/${PV}.tar.gz
+ -> ${MY_P}.gh.tar.gz
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="Apache-2.0 BSD"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
+IUSE="static-libs test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-python/testtools-0.9.34[${PYTHON_USEDEP}]
+ dev-python/iso8601[${PYTHON_USEDEP}]
+"
+DEPEND="
+ ${RDEPEND}
+ >=dev-libs/check-0.9.11[${MULTILIB_USEDEP}]
+ >=dev-util/cppunit-1.13.2[${MULTILIB_USEDEP}]
+ >=virtual/pkgconfig-0-r1
+ test? (
+ dev-python/fixtures[${PYTHON_USEDEP}]
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ dev-python/testscenarios[${PYTHON_USEDEP}]
+ <dev-python/testtools-2.9[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/subunit-1.4.0-werror.patch"
+ # https://github.com/testing-cabal/subunit/commit/a72e9c343bd369cf840b29e074417fed5d05d59c
+ "${FILESDIR}/subunit-1.4.5-testtools-2.8.patch"
+)
+
+src_prepare() {
+ mv all_tests.py python/ || die
+
+ distutils-r1_src_prepare
+ eautoreconf
+ 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() {
+ cd python || die
+ "${EPYTHON}" -m testtools.run -v 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-libLTLIBRARIES
+ )
+ emake DESTDIR="${D}" "${targets[@]}"
+
+ multilib_is_native_abi && distutils-r1_src_install
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ find "${D}" -name '*.la' -delete || die
+}
diff --git a/dev-python/python-subunit/python-subunit-1.4.6.ebuild b/dev-python/python-subunit/python-subunit-1.4.6.ebuild
new file mode 100644
index 000000000000..f5645d739c63
--- /dev/null
+++ b/dev-python/python-subunit/python-subunit-1.4.6.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 multilib-minimal autotools
+
+MY_P=subunit-${PV}
+DESCRIPTION="A streaming protocol for test results"
+HOMEPAGE="
+ https://launchpad.net/subunit/
+ https://github.com/testing-cabal/subunit/
+ https://pypi.org/project/python-subunit/
+"
+SRC_URI="
+ https://github.com/testing-cabal/subunit/archive/${PV}.tar.gz
+ -> ${MY_P}.gh.tar.gz
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="Apache-2.0 BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="static-libs test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ >=dev-python/testtools-0.9.34[${PYTHON_USEDEP}]
+ dev-python/iso8601[${PYTHON_USEDEP}]
+"
+DEPEND="
+ ${RDEPEND}
+ >=dev-libs/check-0.9.11[${MULTILIB_USEDEP}]
+ >=dev-util/cppunit-1.13.2[${MULTILIB_USEDEP}]
+ >=virtual/pkgconfig-0-r1
+ test? (
+ dev-python/fixtures[${PYTHON_USEDEP}]
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ dev-python/testscenarios[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/subunit-1.4.0-werror.patch"
+)
+
+src_prepare() {
+ mv all_tests.py python/ || die
+
+ distutils-r1_src_prepare
+ eautoreconf
+ 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() {
+ cd python || die
+ "${EPYTHON}" -m testtools.run -v 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-libLTLIBRARIES
+ )
+ emake DESTDIR="${D}" "${targets[@]}"
+
+ multilib_is_native_abi && distutils-r1_src_install
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ find "${D}" -name '*.la' -delete || die
+}