commit:     e5cacb67a9e256438731422e14384c16dd0a3897
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 13 05:07:53 2024 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Apr 13 05:35:10 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5cacb67

dev-python/aiohttp-cors: Fix errors with pytest-8

Closes: https://bugs.gentoo.org/928354
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/36231
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 .../aiohttp-cors/aiohttp-cors-0.7.0-r2.ebuild      | 23 ++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/dev-python/aiohttp-cors/aiohttp-cors-0.7.0-r2.ebuild 
b/dev-python/aiohttp-cors/aiohttp-cors-0.7.0-r2.ebuild
index b9f9a8493b93..3b66370dac42 100644
--- a/dev-python/aiohttp-cors/aiohttp-cors-0.7.0-r2.ebuild
+++ b/dev-python/aiohttp-cors/aiohttp-cors-0.7.0-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -34,13 +34,20 @@ BDEPEND="
 
 distutils_enable_tests pytest
 
-PATCHES=(
-       # https://github.com/aio-libs/aiohttp-cors/pull/278
-       "${FILESDIR}/${P}-tests.patch"
-       "${FILESDIR}/${P}-py3_7.patch"
-       # https://github.com/aio-libs/aiohttp-cors/pull/412
-       "${FILESDIR}/${P}-py3_11.patch"
-)
+src_prepare() {
+       local PATCHES=(
+               # https://github.com/aio-libs/aiohttp-cors/pull/278
+               "${FILESDIR}/${P}-tests.patch"
+               "${FILESDIR}/${P}-py3_7.patch"
+               # https://github.com/aio-libs/aiohttp-cors/pull/412
+               "${FILESDIR}/${P}-py3_11.patch"
+       )
+
+       # doesn't do anything, except for breaking pytest-8
+       rm conftest.py || die
+
+       distutils-r1_src_prepare
+}
 
 python_test() {
        local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1

Reply via email to