Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/testtools/
Date: Mon, 12 Jul 2021 03:14:14
Message-Id: 1626059632.3be57e9c52fe2103d46ff42c8e5b4d048b09217e.sam@gentoo
1 commit: 3be57e9c52fe2103d46ff42c8e5b4d048b09217e
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 12 03:12:13 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 12 03:13:52 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3be57e9c
7
8 dev-python/testtools: drop back to EAPI 7 to ease upgrades
9
10 This causes an issue because of the following depchain:
11 samba -> subunit -> testtools (EAPI 8 only)
12
13 While we should try drop the subunit dependency from Samba if possible,
14 let's drop testtools back to EAPI 7 temporarily to ease upgrades
15 for users, given Samba is a very common package (and even dependency).
16
17 Bug: https://bugs.gentoo.org/801637
18 Signed-off-by: Sam James <sam <AT> gentoo.org>
19
20 dev-python/testtools/testtools-2.4.0-r2.ebuild | 6 +++++-
21 1 file changed, 5 insertions(+), 1 deletion(-)
22
23 diff --git a/dev-python/testtools/testtools-2.4.0-r2.ebuild b/dev-python/testtools/testtools-2.4.0-r2.ebuild
24 index fdc73ff2db9..7f2830ce2d4 100644
25 --- a/dev-python/testtools/testtools-2.4.0-r2.ebuild
26 +++ b/dev-python/testtools/testtools-2.4.0-r2.ebuild
27 @@ -1,7 +1,7 @@
28 # Copyright 1999-2021 Gentoo Authors
29 # Distributed under the terms of the GNU General Public License v2
30
31 -EAPI=8
32 +EAPI=7
33
34 PYTHON_COMPAT=( python3_{8..10} pypy3 )
35 PYTHON_REQ_USE="threads(+)"
36 @@ -43,6 +43,10 @@ distutils_enable_tests unittest
37 src_prepare() {
38 # eliminate unittest2 & traceback2
39 sed -i -e '/unittest2/d' -e '/traceback2/d' requirements.txt || die
40 + # eliminate linecache2
41 + sed -i -e 's/import linecache2 as linecache/import linecache/' \
42 + testtools/tests/test_compat.py || die
43 +
44 # also conditional imports
45 find -name '*.py' -exec \
46 sed -i -e 's:unittest2:unittest:' {} + || die