From 3be57e9c52fe2103d46ff42c8e5b4d048b09217e Mon Sep 17 00:00:00 2001 From: Sam James Date: Mon, 12 Jul 2021 04:12:13 +0100 Subject: [PATCH] dev-python/testtools: drop back to EAPI 7 to ease upgrades This causes an issue because of the following depchain: samba -> subunit -> testtools (EAPI 8 only) While we should try drop the subunit dependency from Samba if possible, let's drop testtools back to EAPI 7 temporarily to ease upgrades for users, given Samba is a very common package (and even dependency). Bug: https://bugs.gentoo.org/801637 Signed-off-by: Sam James --- dev-python/testtools/testtools-2.4.0-r2.ebuild | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dev-python/testtools/testtools-2.4.0-r2.ebuild b/dev-python/testtools/testtools-2.4.0-r2.ebuild index fdc73ff2db992..7f2830ce2d40a 100644 --- a/dev-python/testtools/testtools-2.4.0-r2.ebuild +++ b/dev-python/testtools/testtools-2.4.0-r2.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=8 +EAPI=7 PYTHON_COMPAT=( python3_{8..10} pypy3 ) PYTHON_REQ_USE="threads(+)" @@ -43,6 +43,10 @@ distutils_enable_tests unittest src_prepare() { # eliminate unittest2 & traceback2 sed -i -e '/unittest2/d' -e '/traceback2/d' requirements.txt || die + # eliminate linecache2 + sed -i -e 's/import linecache2 as linecache/import linecache/' \ + testtools/tests/test_compat.py || die + # also conditional imports find -name '*.py' -exec \ sed -i -e 's:unittest2:unittest:' {} + || die