commit: 803dd1a701cb659e77bbb99bba5cb4e125b952a3
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 21 13:48:58 2023 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Feb 21 14:15:22 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=803dd1a7
dev-python/cbor: EAPI 8, PEP517, py3.11
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/cbor/cbor-1.0.0-r2.ebuild | 40 ++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/dev-python/cbor/cbor-1.0.0-r2.ebuild
b/dev-python/cbor/cbor-1.0.0-r2.ebuild
new file mode 100644
index 000000000000..af2c125ebd7b
--- /dev/null
+++ b/dev-python/cbor/cbor-1.0.0-r2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit distutils-r1
+
+EGIT_COMMIT="b3af679e7cf3e12d50acb83c3c591fc5db9a658d"
+DESCRIPTION="RFC 7049 - Concise Binary Object Representation"
+HOMEPAGE="
+ https://github.com/brianolson/cbor_py/
+ https://pypi.org/project/cbor/
+"
+SRC_URI="
+ https://github.com/brianolson/cbor_py/archive/${EGIT_COMMIT}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+S=${WORKDIR}/cbor_py-${EGIT_COMMIT}
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
+
+# upstream PR: https://github.com/brianolson/cbor_py/pull/19
+# upstream PR: https://github.com/brianolson/cbor_py/pull/11
+PATCHES=(
+ "${FILESDIR}/cbor-1.0.0.zero-length-bytes.patch"
+ "${FILESDIR}/cbor-1.0.0.Fix-broken-test_sortkeys.patch"
+ "${FILESDIR}/cbor-1.0.0.Replace-deprecated-logger.warn.patch"
+)
+
+python_test() {
+ "${EPYTHON}" cbor/tests/test_cbor.py || die "Testsuite failed under
${EPYTHON}"
+ "${EPYTHON}" cbor/tests/test_objects.py || die "Testsuite failed under
${EPYTHON}"
+ "${EPYTHON}" cbor/tests/test_usage.py || die "Testsuite failed under
${EPYTHON}"
+ "${EPYTHON}" cbor/tests/test_vectors.py || die "Testsuite failed under
${EPYTHON}"
+}