commit:     9d0e46bf53d4ca65ca8f6a4a67b8e91382a6648a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 26 19:37:30 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Oct 26 19:45:14 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d0e46bf

dev-python/httpx: Avoid test dep on app-arch/brotli

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/httpx/httpx-0.25.0.ebuild | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dev-python/httpx/httpx-0.25.0.ebuild 
b/dev-python/httpx/httpx-0.25.0.ebuild
index f705e90d5cef..d1530d4041e9 100644
--- a/dev-python/httpx/httpx-0.25.0.ebuild
+++ b/dev-python/httpx/httpx-0.25.0.ebuild
@@ -39,7 +39,6 @@ RDEPEND="
 BDEPEND="
        dev-python/hatch-fancy-pypi-readme[${PYTHON_USEDEP}]
        test? (
-               app-arch/brotli[python,${PYTHON_USEDEP}]
                dev-python/anyio[${PYTHON_USEDEP}]
                dev-python/brotlicffi[${PYTHON_USEDEP}]
                dev-python/chardet[${PYTHON_USEDEP}]
@@ -60,6 +59,11 @@ src_prepare() {
                sed -i -e '/^httpx =/d' pyproject.toml || die
        fi
        sed -i -e '/rich/s:,<14::' pyproject.toml || die
+
+       # use brotlicffi instead of brotli in tests
+       sed -i -e 's:import brotli:import brotlicffi as brotli:' \
+               tests/test_decoders.py || die
+
        distutils-r1_src_prepare
 }
 

Reply via email to