summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-python/cbor2/cbor2-5.4.6.ebuild12
1 files changed, 11 insertions, 1 deletions
diff --git a/dev-python/cbor2/cbor2-5.4.6.ebuild b/dev-python/cbor2/cbor2-5.4.6.ebuild
index 8642665e99e9..cc594d29a9ea 100644
--- a/dev-python/cbor2/cbor2-5.4.6.ebuild
+++ b/dev-python/cbor2/cbor2-5.4.6.ebuild
@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( pypy3 python3_{10..12} )
inherit distutils-r1 pypi
@@ -31,3 +31,13 @@ python_prepare_all() {
sed -i -e "s/--cov//" pyproject.toml || die
distutils-r1_python_prepare_all
}
+
+python_compile() {
+ local -x CBOR2_BUILD_C_EXTENSION=1
+ # pypy3 not supported upstream
+ # py3.12: https://github.com/agronholm/cbor2/issues/171
+ if has "${EPYTHON}" pypy3 python3.12; then
+ CBOR2_BUILD_C_EXTENSION=0
+ fi
+ distutils-r1_python_compile
+}