commit: 8a13a20c2f47a922d51b26bb714fd5cbadef6d7c
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 21 03:38:09 2023 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Oct 21 03:38:09 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a13a20c
dev-python/cbor2: Bump to 5.5.0
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/cbor2/Manifest | 1 +
dev-python/cbor2/cbor2-5.5.0.ebuild | 46 +++++++++++++++++++++++++++++++++++++
dev-python/cbor2/metadata.xml | 6 +++++
3 files changed, 53 insertions(+)
diff --git a/dev-python/cbor2/Manifest b/dev-python/cbor2/Manifest
index 0827dd0e64bf..49122fba3815 100644
--- a/dev-python/cbor2/Manifest
+++ b/dev-python/cbor2/Manifest
@@ -1 +1,2 @@
DIST cbor2-5.4.6.tar.gz 86909 BLAKE2B
df24c786f32819f9a93a2db28536b78349db6185108188d0a20e7298ff8c083d1feb59110865b4e21190e0363b113201ccddaa0d36b49bd7bbacf9d5ee7695f4
SHA512
44fb3e2e2249c79b1454487670d53eb672ffae4c22374d2a2bb9e314ac15470e4e7913e4eb1981a8bd4d722e6827328dde7e57c5f0556843e951c4723ae5bd8e
+DIST cbor2-5.5.0.tar.gz 94286 BLAKE2B
01c3659c161d47b3e0fa5c9e8833989e448b60d40f408f8c9ebde0a4e3d388dd047aea1666a93f3bb4be1e49695a4089e869d658b594456839c71e2bfe17cb29
SHA512
64b9ef0e358ac02113f85a2e633ed52900c4d5d6c89f889d9322f181e29fbdf9462663b5eaec7a255d5e6d47c82c4902cb7ff56999251c5ec070c7b610e615b3
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