mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-python/multidict: Add a flag to disable C extensions entirely
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -13,4 +13,10 @@
|
||||
<remote-id type="github">aio-libs/multidict</remote-id>
|
||||
<remote-id type="pypi">multidict</remote-id>
|
||||
</upstream>
|
||||
<use>
|
||||
<flag name="native-extensions">
|
||||
Compile native C extensions (speedups, instead of using Python
|
||||
fallback code).
|
||||
</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
|
||||
@@ -22,6 +22,7 @@ SRC_URI="
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos"
|
||||
IUSE="+native-extensions"
|
||||
|
||||
distutils_enable_sphinx docs --no-autodoc
|
||||
distutils_enable_tests pytest
|
||||
@@ -36,7 +37,7 @@ python_prepare_all() {
|
||||
python_compile() {
|
||||
# the C extension segfaults on py3.12
|
||||
# https://github.com/aio-libs/multidict/issues/868
|
||||
if [[ ${EPYTHON} == python3.12 ]]; then
|
||||
if ! use native-extensions || [[ ${EPYTHON} == python3.12 ]]; then
|
||||
local -x MULTIDICT_NO_EXTENSIONS=1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user