From 068424b26532f3551a81421a9be67ed206e5c11a Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 11 Aug 2021 07:02:28 +0100 Subject: gentoo resync : 11.08.2021 --- dev-python/doublex/Manifest | 2 + dev-python/doublex/doublex-1.9.2-r1.ebuild | 55 ++++++++++++++++++++++ dev-python/doublex/files/doublex-1.9.2-py310.patch | 33 +++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 dev-python/doublex/doublex-1.9.2-r1.ebuild create mode 100644 dev-python/doublex/files/doublex-1.9.2-py310.patch (limited to 'dev-python/doublex') diff --git a/dev-python/doublex/Manifest b/dev-python/doublex/Manifest index 3a5047995ed2..2fa6066f0f52 100644 --- a/dev-python/doublex/Manifest +++ b/dev-python/doublex/Manifest @@ -1,3 +1,5 @@ +AUX doublex-1.9.2-py310.patch 958 BLAKE2B 262b23726628d859c31a8e3751d969c3cd6ba2a6d0a84bc172539e553871f269e42d70f1caf6df102a933cbdea42a9432ae973ec5dc8b81c1f2f87923db46650 SHA512 6e603fe6fe7068c8e6fe071d163f5edc3f25d3f4af6147180937fad52d98fcc8fc06cae34d2477293b8deee644473840a8293fa7fe235d68a8e922d032027670 DIST doublex-1.9.2.tar.gz 80246 BLAKE2B 7fc1c4e6d117bee13e7125b634293aa7c9d1016c9cd5201f047143bcb1fae1e9607bf0a030cbaa2d6eb930474babe29aaf244433aba57ae4325a3a43af2fdf56 SHA512 0278f756930b0d5c3da676e3908ccc17b919c14f740aace3002f5117fa341ac52fe16fdaa2c3b36029757dd1dc2f36d8d35cdc8664fcfdbcafd4809d2fc969b0 +EBUILD doublex-1.9.2-r1.ebuild 1537 BLAKE2B 6c004eb64460e9bbc484438a4bb513f5e874459407d81c9583cda4402a3ff9c6a133f0425becad7a445e5e5bac80cd3a3f4d5d76d8b420409ce4a6673484ebb0 SHA512 06ae6d33f1274b8f43afad93129ba02985c6ba94cb02b31b2394854f707f67088ed8deb7aa089de88728372fbf0de3edfbc8d385b75f9a0b319f5a58e9f95eee EBUILD doublex-1.9.2.ebuild 1402 BLAKE2B e08b16a7643875652527fe84d20095a9d3b07d7e5e5da340aabd2a3e52b247993eabb42505892277188450b8f06cb974f57e6cc3a4c42f1ab61bb10d63d0285f SHA512 a80aa20d58616dc3c2e848e26d8c95008620b5bce8262bcac03cf735589442bfe4f1b46422dcd39215205c9fd16379771fe96e91bd2b6fb9c24ad5bc96b64eb4 MISC metadata.xml 303 BLAKE2B 45ebb26950f3f4fc9bc3d6d99418f544523b778c3952e91e6bfb5f37bdfc13b73d25e24bcaf199d61a69cad733fe370cd19ad0c934b3d478097c52ede1316784 SHA512 efe73a700fe748323eeb26f9203b3aab0e189c8ceb56efba5ba97a91793a5deb0ad973dad345e240fc9c15803b929fd84f26524055de1f2290f40042f318d2c9 diff --git a/dev-python/doublex/doublex-1.9.2-r1.ebuild b/dev-python/doublex/doublex-1.9.2-r1.ebuild new file mode 100644 index 000000000000..a52b1c1636dd --- /dev/null +++ b/dev-python/doublex/doublex-1.9.2-r1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..10} ) + +inherit distutils-r1 vcs-snapshot + +DESCRIPTION="Python test doubles" +HOMEPAGE="https://bitbucket.org/DavidVilla/python-doublex" +SRC_URI="https://bitbucket.org/DavidVilla/python-${PN}/get/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm64" +IUSE="doc test" + +RDEPEND=" + dev-python/pyhamcrest[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] +" +BDEPEND=" + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) + test? ( dev-python/nose[${PYTHON_USEDEP}] ) +" + +distutils_enable_tests setup.py + +PATCHES=( + # https://bitbucket.org/DavidVilla/python-doublex/pull-requests/1/support-python-310-by-using-collectionsabc + "${FILESDIR}/${P}-py310.patch" +) + +python_prepare_all() { + # Disable broken tests + # https://bitbucket.org/DavidVilla/python-doublex/issues/5/support-for-python-36-37-38-tests-failing + sed -i "s/test_*hamcrest_/_&/" doublex/test/report_tests.py || die + # https://bitbucket.org/DavidVilla/python-doublex/issues/6/more-failing-tests-with-python-39 + sed -i -r "s/test_(proxyspy_get_stubbed_property|stub_property|custom_equality_comparable_objects)/_&/" \ + doublex/test/unit_tests.py || die + distutils-r1_python_prepare_all +} + +python_compile_all() { + use doc && emake -C docs +} + +python_install_all() { + use doc && local HTML_DOCS=( docs/_build/html/. ) + + distutils-r1_python_install_all + + rm "${ED}"/usr/README.rst || die "Couldn't remove spurious README.rst" +} diff --git a/dev-python/doublex/files/doublex-1.9.2-py310.patch b/dev-python/doublex/files/doublex-1.9.2-py310.patch new file mode 100644 index 000000000000..5d3a974a38a1 --- /dev/null +++ b/dev-python/doublex/files/doublex-1.9.2-py310.patch @@ -0,0 +1,33 @@ +commit ec3ce987a95abd951840213b77d44624b2ca5e84 +Author: Louis Sautier +Date: Sat Aug 7 01:56:31 2021 +0200 + + Support Python 3.10 by using collections.abc + +diff --git a/doublex/internal.py b/doublex/internal.py +index 91f5866..072774a 100644 +--- a/doublex/internal.py ++++ b/doublex/internal.py +@@ -20,7 +20,7 @@ + + + import threading +-import collections ++import collections.abc + import functools + import six + +@@ -184,11 +184,11 @@ class Invocation(object): + return Invocation(double, name, InvocationContext(*args, **kargs)) + + def delegates(self, delegate): +- if isinstance(delegate, collections.Callable): ++ if isinstance(delegate, collections.abc.Callable): + self.__delegate = delegate + return + +- if isinstance(delegate, collections.Mapping): ++ if isinstance(delegate, collections.abc.Mapping): + self.__delegate = delegate.get + return + -- cgit v1.2.3