Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/backports-zoneinfo/
Date: Thu, 03 Dec 2020 14:34:40
Message-Id: 1607006073.71b1516c8f2f948de2ff8d134ea822d0ab35f494.mgorny@gentoo
1 commit: 71b1516c8f2f948de2ff8d134ea822d0ab35f494
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 3 14:33:56 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 3 14:34:33 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71b1516c
7
8 dev-python/backports-zoneinfo: Skip tests on pypy3.6
9
10 Closes: https://bugs.gentoo.org/758275
11 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
12
13 .../backports-zoneinfo/backports-zoneinfo-0.2.1.ebuild | 15 +++++++++++++++
14 1 file changed, 15 insertions(+)
15
16 diff --git a/dev-python/backports-zoneinfo/backports-zoneinfo-0.2.1.ebuild b/dev-python/backports-zoneinfo/backports-zoneinfo-0.2.1.ebuild
17 index a801aa6a0fe..75591e16718 100644
18 --- a/dev-python/backports-zoneinfo/backports-zoneinfo-0.2.1.ebuild
19 +++ b/dev-python/backports-zoneinfo/backports-zoneinfo-0.2.1.ebuild
20 @@ -38,6 +38,21 @@ BDEPEND="
21 # pytest-subtests
22 distutils_enable_tests unittest
23
24 +python_test() {
25 + if [[ ${EPYTHON} == pypy3 ]]; then
26 + # pypy3.6 does not support dataclasses, and the backport
27 + # does not work with pypy
28 + local pypy3_version=$(best_version -b 'dev-python/pypy3')
29 + if [[ ${pypy3_version} != *_p37* ]]; then
30 + einfo "Skipping tests on pypy3.6 due to missing deps"
31 + return
32 + fi
33 + fi
34 +
35 + "${EPYTHON}" -m unittest discover -v ||
36 + die "Tests failed with ${EPYTHON}"
37 +}
38 +
39 python_install() {
40 # avoid file collisions
41 rm "${BUILD_DIR}"/lib/backports/__init__.py || die