summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/multidict')
-rw-r--r--dev-python/multidict/metadata.xml6
-rw-r--r--dev-python/multidict/multidict-6.0.4-r1.ebuild3
2 files changed, 8 insertions, 1 deletions
diff --git a/dev-python/multidict/metadata.xml b/dev-python/multidict/metadata.xml
index 7a91ba1ea080..de495329e26d 100644
--- a/dev-python/multidict/metadata.xml
+++ b/dev-python/multidict/metadata.xml
@@ -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>
diff --git a/dev-python/multidict/multidict-6.0.4-r1.ebuild b/dev-python/multidict/multidict-6.0.4-r1.ebuild
index 84caa6eba04e..b96ba51c677a 100644
--- a/dev-python/multidict/multidict-6.0.4-r1.ebuild
+++ b/dev-python/multidict/multidict-6.0.4-r1.ebuild
@@ -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