summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2020-07-19 18:50:58 -0700
committerBrian Dolbec <dolsen@gentoo.org>2020-07-19 18:52:01 -0700
commit3074eb67b6dbec76e6f0adedd49fb8f647e4b265 (patch)
tree4b5734ee6786a12620e347bf4072e76b72e5e11d /dev-python/cbor/cbor-1.0.0-r1.ebuild
parentdev-ruby/rspec-stubbed_env: x86 keyworded (bug #709774) (diff)
downloadgentoo-3074eb67b6dbec76e6f0adedd49fb8f647e4b265.tar.gz
gentoo-3074eb67b6dbec76e6f0adedd49fb8f647e4b265.tar.bz2
gentoo-3074eb67b6dbec76e6f0adedd49fb8f647e4b265.zip
dev-python/cbor: Fix test failure bug 719648
Adds trivial patches to main code, fixes test_cbor.py test_sortkeys() wrongly assuming dictionary keys may not always be sorted when added in sorted order. Fix the test phase not finding the c extension module. Update metadata.xml to github repo. Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
Diffstat (limited to 'dev-python/cbor/cbor-1.0.0-r1.ebuild')
-rw-r--r--dev-python/cbor/cbor-1.0.0-r1.ebuild40
1 files changed, 40 insertions, 0 deletions
diff --git a/dev-python/cbor/cbor-1.0.0-r1.ebuild b/dev-python/cbor/cbor-1.0.0-r1.ebuild
new file mode 100644
index 000000000000..7d99ec530944
--- /dev/null
+++ b/dev-python/cbor/cbor-1.0.0-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{6,7,8} )
+
+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() {
+ distutils_install_for_testing
+ PYTHONPATH="${BUILD_DIR}/lib" \
+ "${PYTHON:-python}" cbor/tests/test_cbor.py || die "Testsuite failed under ${EPYTHON}"
+ PYTHONPATH="${BUILD_DIR}/lib" \
+ "${PYTHON:-python}" cbor/tests/test_objects.py || die "Testsuite failed under ${EPYTHON}"
+ PYTHONPATH="${BUILD_DIR}/lib" \
+ "${PYTHON:-python}" cbor/tests/test_usage.py || die "Testsuite failed under ${EPYTHON}"
+ PYTHONPATH="${BUILD_DIR}/lib" \
+ "${PYTHON:-python}" cbor/tests/test_vectors.py || die "Testsuite failed under ${EPYTHON}"
+}