summaryrefslogtreecommitdiff
path: root/dev-python/cbor2
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/cbor2')
-rw-r--r--dev-python/cbor2/Manifest4
-rw-r--r--dev-python/cbor2/cbor2-5.5.0.ebuild46
-rw-r--r--dev-python/cbor2/metadata.xml6
3 files changed, 55 insertions, 1 deletions
diff --git a/dev-python/cbor2/Manifest b/dev-python/cbor2/Manifest
index b4bed20731a7..0fdae8ba4a91 100644
--- a/dev-python/cbor2/Manifest
+++ b/dev-python/cbor2/Manifest
@@ -1,3 +1,5 @@
DIST cbor2-5.4.6.tar.gz 86909 BLAKE2B df24c786f32819f9a93a2db28536b78349db6185108188d0a20e7298ff8c083d1feb59110865b4e21190e0363b113201ccddaa0d36b49bd7bbacf9d5ee7695f4 SHA512 44fb3e2e2249c79b1454487670d53eb672ffae4c22374d2a2bb9e314ac15470e4e7913e4eb1981a8bd4d722e6827328dde7e57c5f0556843e951c4723ae5bd8e
+DIST cbor2-5.5.0.tar.gz 94286 BLAKE2B 01c3659c161d47b3e0fa5c9e8833989e448b60d40f408f8c9ebde0a4e3d388dd047aea1666a93f3bb4be1e49695a4089e869d658b594456839c71e2bfe17cb29 SHA512 64b9ef0e358ac02113f85a2e633ed52900c4d5d6c89f889d9322f181e29fbdf9462663b5eaec7a255d5e6d47c82c4902cb7ff56999251c5ec070c7b610e615b3
EBUILD cbor2-5.4.6.ebuild 1007 BLAKE2B abeefeb2f1534bce671981faaa9d85595030b06e72bcd33f77fe22de87247fe5cfec7b4c58929681ed75bbcffcf48c515af834c9fddff98737bb979700f6bb47 SHA512 9f733c41454188c86315e42ac8cffd03e7c4a916018236a17ae1abfe7e20fba747470811770bcc50c5a514c6bef8abcaa1be19862702953649c7416afddb9bf5
-MISC metadata.xml 995 BLAKE2B 8b9c668c2628dc12eab5bc42ca90a5c7e1ed64405b3de54ccca8dca90a974e9e2274b8815bc800d5427c6128c2f369eb5fc1fe17b5f6dbcee242239966dcdb98 SHA512 12f4909783b90ac9eef2ef4141f6f0041c2faed7ccb3d08f64fc8cd4e36e5ad8a3a5068267f6dc02c8d2fca5213d26f28ce468ce4487a0b2d44cdb558d4882c8
+EBUILD cbor2-5.5.0.ebuild 1054 BLAKE2B 71f7d0de700de61d5ec09bc547953c74f9361389ee2a192a142fabd977577a6420b9c3ef63f46401dccd55ab0e4355c6c5b62bf9b32fa9e302fbff1017ccd57d SHA512 af1dae5c7b960ffed8016361aec9e212dcc100c89563478bedd59f18b0ef8dcdf8d4af549a278f7e6f8400efac05ff20856727678c307f56b7bba35fb3a282ee
+MISC metadata.xml 1142 BLAKE2B 689bac6d11c7cd4044b2528c5a6bbb183accdada7865efa65ffa6fb52160bf34d4e3629101eb9ceac88e842caae92f4df1e9ce2a5c3ffaa709ece08786267f96 SHA512 82647cdf6d750d791a46784b92cc8ef2f4ead08227f266f6ad782fbaea2e90fea0cfabe5d79848b3c9253a38af1e105b9a279d9e7ca4e1edd3aec79aa5897a1a
diff --git a/dev-python/cbor2/cbor2-5.5.0.ebuild b/dev-python/cbor2/cbor2-5.5.0.ebuild
new file mode 100644
index 000000000000..891987b304a0
--- /dev/null
+++ b/dev-python/cbor2/cbor2-5.5.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( pypy3 python3_{10..12} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Pure Python CBOR (de)serializer with extensive tag support"
+HOMEPAGE="
+ https://github.com/agronholm/cbor2/
+ https://pypi.org/project/cbor2/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="+native-extensions"
+
+BDEPEND="
+ >=dev-python/setuptools-61[${PYTHON_USEDEP}]
+ >=dev-python/setuptools-scm-6.4[${PYTHON_USEDEP}]
+ test? (
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ # remove pytest-cov dep
+ 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
+ if [[ ${EPYTHON} == pypy3 ]] || ! use native-extensions; then
+ CBOR2_BUILD_C_EXTENSION=0
+ fi
+ distutils-r1_python_compile
+}
diff --git a/dev-python/cbor2/metadata.xml b/dev-python/cbor2/metadata.xml
index 50a3d751d1f8..957e87f7ed85 100644
--- a/dev-python/cbor2/metadata.xml
+++ b/dev-python/cbor2/metadata.xml
@@ -17,6 +17,12 @@
<remote-id type="pypi">cbor2</remote-id>
<remote-id type="github">agronholm/cbor2</remote-id>
</upstream>
+ <use>
+ <flag name="native-extensions">
+ Compiles native "C" extensions (speedups, instead of using python
+ fallback code).
+ </flag>
+ </use>
<longdescription>This library provides encoding and decoding for the
Concise Binary Object Representation (CBOR) (RFC 7049) serialization format.
It is implemented in pure python with an optional C backend and is compatible