diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-06-23 10:56:53 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-06-23 11:26:31 +0200 |
commit | e0f9994fc8d7486c0423475a9f881656f9a1a125 (patch) | |
tree | 43805c3d63d89c87526d161f132ae87605cf7756 /dev-python/cbor2 | |
parent | dev-python/cattrs: Put dev-python/orjson under IUSE=test-rust (diff) | |
download | gentoo-e0f9994fc8d7486c0423475a9f881656f9a1a125.tar.gz gentoo-e0f9994fc8d7486c0423475a9f881656f9a1a125.tar.bz2 gentoo-e0f9994fc8d7486c0423475a9f881656f9a1a125.zip |
dev-python/cbor2: Enable pypy3 & py3.12
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/cbor2')
-rw-r--r-- | dev-python/cbor2/cbor2-5.4.6.ebuild | 12 |
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 +} |