commit: e0f9994fc8d7486c0423475a9f881656f9a1a125
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 23 08:56:53 2023 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jun 23 09:26:31 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0f9994f
dev-python/cbor2: Enable pypy3 & py3.12
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/cbor2/cbor2-5.4.6.ebuild | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
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
+}