diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-02-12 09:56:54 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-02-12 09:56:54 +0000 |
commit | ebc282ef4dfa408accac685565b8ee5f6faec119 (patch) | |
tree | c0a4f713228cda0ab17eed46f0bb7ca8cb8be2f6 /dev-python/doublex | |
parent | 6c8694a707151d59555b0e4e48235f085ce166c3 (diff) |
gentoo auto-resync : 12:02:2023 - 09:56:54
Diffstat (limited to 'dev-python/doublex')
-rw-r--r-- | dev-python/doublex/Manifest | 3 | ||||
-rw-r--r-- | dev-python/doublex/doublex-1.9.5.1.ebuild | 59 | ||||
-rw-r--r-- | dev-python/doublex/files/doublex-1.9.5.1-py310.patch | 29 |
3 files changed, 91 insertions, 0 deletions
diff --git a/dev-python/doublex/Manifest b/dev-python/doublex/Manifest index 08ba2f6c6cb6..05a85e48fbd6 100644 --- a/dev-python/doublex/Manifest +++ b/dev-python/doublex/Manifest @@ -1,4 +1,7 @@ AUX doublex-1.9.2-py310.patch 958 BLAKE2B 262b23726628d859c31a8e3751d969c3cd6ba2a6d0a84bc172539e553871f269e42d70f1caf6df102a933cbdea42a9432ae973ec5dc8b81c1f2f87923db46650 SHA512 6e603fe6fe7068c8e6fe071d163f5edc3f25d3f4af6147180937fad52d98fcc8fc06cae34d2477293b8deee644473840a8293fa7fe235d68a8e922d032027670 +AUX doublex-1.9.5.1-py310.patch 982 BLAKE2B 9714bb4ac2eb8e96e8745daa7880055464225b0a8ec2e536839921d020dc0bb54a8067a29a072dfdca7c1c2912a8f7878cbc382da12a0bd3ec95e46b09a80517 SHA512 db4ecdb452c67037e2f37fff54923c115ded67d2e2028e7facb6c034ab2419ca4110b774368e902871cc1cad6ad354b5afcdc38bbcfddb8cc4a82f626e10bef0 DIST doublex-1.9.2.tar.gz 80246 BLAKE2B 7fc1c4e6d117bee13e7125b634293aa7c9d1016c9cd5201f047143bcb1fae1e9607bf0a030cbaa2d6eb930474babe29aaf244433aba57ae4325a3a43af2fdf56 SHA512 0278f756930b0d5c3da676e3908ccc17b919c14f740aace3002f5117fa341ac52fe16fdaa2c3b36029757dd1dc2f36d8d35cdc8664fcfdbcafd4809d2fc969b0 +DIST doublex-1.9.5.1.tar.gz 80508 BLAKE2B 3c3e233bbe4fcc3a122430bfb826ab9824d41472e80802f0e6d345da83cbe97bb33912a831bead550299942b0087063e86839f6bf3a29a08164b6e3bf641f437 SHA512 498e8a8076ed7d3585aae7a20edf54d4143e6875cd8e7af3b47f9f9cfc612a5217d7877092c2af7f1ac80c7aad7be89946671a836fc5817de06ec541c0cb1e06 EBUILD doublex-1.9.2-r1.ebuild 1535 BLAKE2B 1f469fe719ae1bf4b573723e38ef003ce28a05d050deb1060ce3607bf813c5003e993ff1d3edde3715c9e6acbbfa8de38b88f65339380e8b6bd391e2d4d7dce2 SHA512 64a341420811c7de353f576cc44c5abc353ac27d2a73f2b0b58d4f1eee5343cf1e54879862806380a13b075c6b78b3a8691225e65b8c303950f9ec70ccb324aa +EBUILD doublex-1.9.5.1.ebuild 1565 BLAKE2B aee5c59a31675ddfe90d831de302bb41108e555f1c62b1f30af653f1fc7c3b2e306cc2b9fae497f811a869e68f09521f7587f3fd2c918c038f6b223a459d23d2 SHA512 8316c032262f3c45f0e234fc4567d5295bbbdccab2bec454d9d84c77c2a9c022ce90ad47734f68c277464d50d00dd24d88ede5f9fc297e15d75fdebe0f4c6214 MISC metadata.xml 304 BLAKE2B 2b8e349825aaa51e57265c3d23f1b66904d763c9efc22148526dcfaca73ec11a0da8feb5267e48606d6da3ab01e14d137f8109b3ed593df782f660c78fa32ac8 SHA512 eb780391c2a105819a882ce027e17843e22a5e31e56c9b3561352546f9e6156372a7692e0b4e7e2168f6bd19cbbf02ea8eb5e293a1856bfeca6fac085a018f53 diff --git a/dev-python/doublex/doublex-1.9.5.1.ebuild b/dev-python/doublex/doublex-1.9.5.1.ebuild new file mode 100644 index 000000000000..cb7f59b841d4 --- /dev/null +++ b/dev-python/doublex/doublex-1.9.5.1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) +DISTUTILS_USE_PEP517=setuptools + +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}] ) +" + +PATCHES=( + # https://github.com/davidvilla/python-doublex/commit/425807d7276dcea0e0640384d65aeb15184c508c + "${FILESDIR}/${P}-py310.patch" +) + +distutils_enable_tests pytest + +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" +} + +python_test() { + epytest -o 'python_files=*_tests.py' +} diff --git a/dev-python/doublex/files/doublex-1.9.5.1-py310.patch b/dev-python/doublex/files/doublex-1.9.5.1-py310.patch new file mode 100644 index 000000000000..e4aa9153115e --- /dev/null +++ b/dev-python/doublex/files/doublex-1.9.5.1-py310.patch @@ -0,0 +1,29 @@ +From b76a792b48109f1a10f460878fbe0fd78c41cd93 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Sat, 11 Feb 2023 02:00:46 +0100 +Subject: [PATCH] Fix import to collections.abc.Callable for Python >=3.10 + +Subset of this post-1.9.5.1 upstream commit: +https://github.com/davidvilla/python-doublex/commit/425807d7276dcea0e0640384d65aeb15184c508c +--- + doublex/internal.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/doublex/internal.py b/doublex/internal.py +index a85da9f..e5b25cb 100644 +--- a/doublex/internal.py ++++ b/doublex/internal.py +@@ -24,8 +24,8 @@ import threading + import functools + import six + +-if sys.version_info < (3, 3): +- from collection.abc import Callable as abc_Callable, Mapping as abc_Mapping ++if sys.version_info > (3, 3): ++ from collections.abc import Callable as abc_Callable, Mapping as abc_Mapping + else: + from collections import Callable as abc_Callable, Mapping as abc_Mapping + +-- +2.39.1 + |