Gentoo Archives: gentoo-commits

From: Arthur Zamarin <arthurzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/subunit/
Date: Fri, 01 Oct 2021 05:42:56
Message-Id: 1633066923.46b8969910cd986f2ace145e4a4213459983752e.arthurzam@gentoo
1 commit: 46b8969910cd986f2ace145e4a4213459983752e
2 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Oct 1 05:39:02 2021 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 1 05:42:03 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46b89699
7
8 dev-python/subunit: add 1.4.0_p20210729, enable py3.10, fix tests
9
10 Closes: https://bugs.gentoo.org/800728
11 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
12
13 dev-python/subunit/Manifest | 1 +
14 dev-python/subunit/subunit-1.4.0_p20210729.ebuild | 99 +++++++++++++++++++++++
15 2 files changed, 100 insertions(+)
16
17 diff --git a/dev-python/subunit/Manifest b/dev-python/subunit/Manifest
18 index cfcaf554695..e59f6c68e1f 100644
19 --- a/dev-python/subunit/Manifest
20 +++ b/dev-python/subunit/Manifest
21 @@ -1 +1,2 @@
22 DIST subunit-1.4.0.tar.gz 488022 BLAKE2B 4c3a714d02eeed9420074c4e032778a69b716a5cad0079193533e9bc8c0f4576d70b165eb413203ce8a916ac28466e9f5a113d4a7746019d7d09409df9860bae SHA512 5d2e3cb96c09067ef4595c86648f13330c810b19e39c0b35bc9546c57bee957ddcf5cad7b8e3f92bda9b54dcdbf175863e2f6ba94020f880230459be7afdbbcf
23 +DIST subunit-1.4.0_p20210729.tar.gz 112644 BLAKE2B 56e785c029f3f2896d0ed3d8005c37403e6aa32d05b653db0e3b679d2157820558e578b53133f4f79404a660f37a710aeeec03ff941fd7cd0819020a0d474515 SHA512 90b1ad071fb5246a7446a4c999142566b9d96c39838905e9020b80f2f0aba0b86dd5185bbd25ff7fc65f69ae68e1e53dfde5b2de05755aa97db9248c6faaa9d7
24
25 diff --git a/dev-python/subunit/subunit-1.4.0_p20210729.ebuild b/dev-python/subunit/subunit-1.4.0_p20210729.ebuild
26 new file mode 100644
27 index 00000000000..2fbb1719b15
28 --- /dev/null
29 +++ b/dev-python/subunit/subunit-1.4.0_p20210729.ebuild
30 @@ -0,0 +1,99 @@
31 +# Copyright 1999-2021 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +
36 +PYTHON_COMPAT=( python3_{8..10} pypy3 )
37 +
38 +inherit distutils-r1 multilib-minimal autotools
39 +
40 +MY_COMMIT="c87ffbd904627d777aa1430963dced92a36aa033"
41 +
42 +DESCRIPTION="A streaming protocol for test results"
43 +HOMEPAGE="https://launchpad.net/subunit https://pypi.org/project/python-subunit/"
44 +SRC_URI="
45 + https://github.com/testing-cabal/subunit/archive/${MY_COMMIT}.tar.gz
46 + -> ${P}.tar.gz
47 +"
48 +S="${WORKDIR}/${PN}-${MY_COMMIT}"
49 +
50 +LICENSE="Apache-2.0 BSD"
51 +SLOT="0"
52 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
53 +IUSE="static-libs test"
54 +RESTRICT="!test? ( test )"
55 +
56 +RDEPEND="
57 + >=dev-python/testtools-0.9.34[${PYTHON_USEDEP}]
58 + dev-python/extras[${PYTHON_USEDEP}]
59 + dev-lang/perl:="
60 +
61 +DEPEND="
62 + ${RDEPEND}
63 + >=dev-libs/check-0.9.11[${MULTILIB_USEDEP}]
64 + >=dev-util/cppunit-1.13.2[${MULTILIB_USEDEP}]
65 + >=virtual/pkgconfig-0-r1
66 + test? (
67 + dev-python/fixtures[${PYTHON_USEDEP}]
68 + dev-python/hypothesis[${PYTHON_USEDEP}]
69 + dev-python/testscenarios[${PYTHON_USEDEP}]
70 + )"
71 +
72 +PATCHES=(
73 + "${FILESDIR}/subunit-1.4.0-werror.patch"
74 +)
75 +
76 +src_prepare() {
77 + sed -i -e 's/os.chdir(os.path.dirname(__file__))//' setup.py || die
78 +
79 + # Install perl modules in vendor_perl, bug 534654.
80 + export INSTALLDIRS=vendor
81 +
82 + # fails on py3.6
83 + sed -i -e 's:test_add_tag:_&:' \
84 + python/subunit/tests/test_subunit_tags.py || die
85 +
86 + mv all_tests.py python/ || die
87 +
88 + distutils-r1_src_prepare
89 + eautoreconf
90 + multilib_copy_sources
91 +}
92 +
93 +multilib_src_configure() {
94 + ECONF_SOURCE=${S} \
95 + econf \
96 + --enable-shared \
97 + $(use_enable static-libs static)
98 +}
99 +
100 +multilib_src_compile() {
101 + default
102 + multilib_is_native_abi && distutils-r1_src_compile
103 +}
104 +
105 +python_test() {
106 + cd python || die
107 + "${PYTHON}" -m testtools.run -v all_tests.test_suite || die "Testing failed with ${EPYTHON}"
108 +}
109 +
110 +multilib_src_test() {
111 + multilib_is_native_abi && distutils-r1_src_test
112 +}
113 +
114 +multilib_src_install() {
115 + local targets=(
116 + install-include_subunitHEADERS
117 + install-pcdataDATA
118 + install-exec-local
119 + install-libLTLIBRARIES
120 + )
121 + emake DESTDIR="${D}" "${targets[@]}"
122 +
123 + multilib_is_native_abi && distutils-r1_src_install
124 +}
125 +
126 +multilib_src_install_all() {
127 + einstalldocs
128 + find "${D}" -name '*.la' -delete || die
129 +}