mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-06 02:17:34 -08:00
dev-python/aiohttp: Unbundle llhttp again
Closes: https://bugs.gentoo.org/953899 Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
parent
2dfc379902
commit
128b85f6e3
@ -17,10 +17,18 @@ HOMEPAGE="
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
IUSE="+native-extensions test-rust"
|
||||
|
||||
DEPEND="
|
||||
native-extensions? (
|
||||
$(python_gen_cond_dep '
|
||||
net-libs/llhttp:=
|
||||
' 'python3*')
|
||||
)
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
>=dev-python/aiodns-3.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/aiohappyeyeballs-2.3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/aiosignal-1.1.2[${PYTHON_USEDEP}]
|
||||
@ -61,13 +69,19 @@ EPYTEST_XDIST=1
|
||||
distutils_enable_tests pytest
|
||||
|
||||
src_prepare() {
|
||||
local PATCHES=(
|
||||
"${FILESDIR}/${PN}-3.11.17-unbundle-llhttp.patch"
|
||||
)
|
||||
|
||||
distutils-r1_src_prepare
|
||||
|
||||
# increase the timeout a little
|
||||
sed -e '/abs=/s/0.001/0.01/' -i tests/test_helpers.py || die
|
||||
# xfail_strict fails on py3.10
|
||||
sed -i -e '/--cov/d' -e '/pytest_cov/d' -e '/xfail_strict/d' setup.cfg || die
|
||||
sed -i -e 's:-Werror::' Makefile || die
|
||||
|
||||
distutils-r1_src_prepare
|
||||
# remove vendored llhttp
|
||||
rm -r vendor || die
|
||||
}
|
||||
|
||||
python_configure() {
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
diff --git a/aiohttp/_cparser.pxd b/aiohttp/_cparser.pxd
|
||||
index c2cd5a92f..1b3be6d4e 100644
|
||||
--- a/aiohttp/_cparser.pxd
|
||||
+++ b/aiohttp/_cparser.pxd
|
||||
@@ -1,7 +1,7 @@
|
||||
from libc.stdint cimport int32_t, uint8_t, uint16_t, uint64_t
|
||||
|
||||
|
||||
-cdef extern from "../vendor/llhttp/build/llhttp.h":
|
||||
+cdef extern from "llhttp.h":
|
||||
|
||||
struct llhttp__internal_s:
|
||||
int32_t _index
|
||||
diff --git a/setup.py b/setup.py
|
||||
index c9a2c5c85..fe1a8101f 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -33,12 +33,9 @@ extensions = [
|
||||
[
|
||||
"aiohttp/_http_parser.c",
|
||||
"aiohttp/_find_header.c",
|
||||
- "vendor/llhttp/build/c/llhttp.c",
|
||||
- "vendor/llhttp/src/native/api.c",
|
||||
- "vendor/llhttp/src/native/http.c",
|
||||
],
|
||||
define_macros=[("LLHTTP_STRICT_MODE", 0)],
|
||||
- include_dirs=["vendor/llhttp/build"],
|
||||
+ libraries=["llhttp"],
|
||||
),
|
||||
Extension("aiohttp._http_writer", ["aiohttp/_http_writer.c"]),
|
||||
Extension("aiohttp._websocket.reader_c", ["aiohttp/_websocket/reader_c.c"]),
|
||||
Loading…
x
Reference in New Issue
Block a user