summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-02-11 19:51:36 +0100
committerMichał Górny <mgorny@gentoo.org>2023-02-11 20:11:48 +0100
commit5302566a0770ad610a87fbf409e600d495d94158 (patch)
treefd83fc572b49779080aaa63051999e67de83cb61 /dev-python/fakeredis
parentdev-python/sphinxcontrib-autoprogram: Bump to 0.1.8 (diff)
downloadgentoo-5302566a0770ad610a87fbf409e600d495d94158.tar.gz
gentoo-5302566a0770ad610a87fbf409e600d495d94158.tar.bz2
gentoo-5302566a0770ad610a87fbf409e600d495d94158.zip
dev-python/fakeredis: Bump to 2.8.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/fakeredis')
-rw-r--r--dev-python/fakeredis/Manifest1
-rw-r--r--dev-python/fakeredis/fakeredis-2.8.0.ebuild83
2 files changed, 84 insertions, 0 deletions
diff --git a/dev-python/fakeredis/Manifest b/dev-python/fakeredis/Manifest
index 738ea8eb2106..f20c73ac4de6 100644
--- a/dev-python/fakeredis/Manifest
+++ b/dev-python/fakeredis/Manifest
@@ -3,3 +3,4 @@ DIST fakeredis-py-2.5.0.gh.tar.gz 139911 BLAKE2B 4e9c616b0066012e1ed681d06e73390
DIST fakeredis-py-2.6.0.gh.tar.gz 151925 BLAKE2B 60538efa5de93436177aa019908f02affb9df9b2aaf1349e933da6f066f98aaa255bbdb3297645ad1dc3b67a57a61bb8081e476f451799b512719f5779c1218d SHA512 19a23be7a182f962e66686f3c4ec3a5b9fbc847d97e48f19fde11ae268f4a70de567ff2ca302a9fe0e7080de2215698cf5b2ff2febda5eef6748f3ec8d601720
DIST fakeredis-py-2.7.0.gh.tar.gz 162784 BLAKE2B acb218c375785ad4b8419f08f9c328f33f97eedb0f13ae09b760b6c87849b3f8a4b9210fe6aea59d763b27909bff8297a009757a1f5fd9b58c1936e6705e0833 SHA512 fc11f3b59971ae50f59e9d1684827a8f4d1127813f7d55641b43b1edbb1e4c75c76aa0734ad55c98cca404c7e343a02f72644f05aceb72849ef6f18dc2418890
DIST fakeredis-py-2.7.1.gh.tar.gz 162831 BLAKE2B dec29c4b2f5e2c4f9492af00f7b6758ab18dba48ab92e382c78fa105a8bd6230cffc583876a203213d5e205c8cea5b0680518a48e74b7014b189e3b8f3ad3a65 SHA512 31a51feaaba208f4029e7c2030785f5c2fa670996d42ccde8f9e98f13d820fbaccfc17fa535589ec750625cdb0b13c40e57bf901f4bb73bae9054554698fcabf
+DIST fakeredis-py-2.8.0.gh.tar.gz 163863 BLAKE2B ccfb685e57e011afe22906751d3b48c840ffff5ab71ce8b27a36c9168418dfcb4c3761d4162bc9f587396c04bbe4878675921bdfd43effa62ffc0ce6133d7aaf SHA512 51199af0b3abada364664df8d0a091a7f200daf2c180f45488414672962338db8055488629f45d4a0046c48bcf711927c184726efe6cda4c4765fe9763447551
diff --git a/dev-python/fakeredis/fakeredis-2.8.0.ebuild b/dev-python/fakeredis/fakeredis-2.8.0.ebuild
new file mode 100644
index 000000000000..11e604ae7bad
--- /dev/null
+++ b/dev-python/fakeredis/fakeredis-2.8.0.ebuild
@@ -0,0 +1,83 @@
+# Copyright 2020-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=poetry
+PYTHON_COMPAT=( pypy3 python3_{9..11} )
+
+inherit distutils-r1
+
+MY_P=fakeredis-py-${PV}
+DESCRIPTION="Fake implementation of redis API for testing purposes"
+HOMEPAGE="
+ https://github.com/cunla/fakeredis-py/
+ https://pypi.org/project/fakeredis/
+"
+SRC_URI="
+ https://github.com/cunla/fakeredis-py/archive/v${PV}.tar.gz
+ -> ${MY_P}.gh.tar.gz
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+RDEPEND="
+ <dev-python/redis-5[${PYTHON_USEDEP}]
+ >=dev-python/redis-4.2[${PYTHON_USEDEP}]
+ <dev-python/sortedcontainers-3[${PYTHON_USEDEP}]
+ >=dev-python/sortedcontainers-2.4.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-db/redis
+ dev-python/pytest-asyncio[${PYTHON_USEDEP}]
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # also lupa
+ test/test_aioredis2.py::test_failed_script_error
+ # TODO
+ "test/test_fakeredis.py::test_set_get_nx[StrictRedis]"
+ "test/test_fakeredis.py::test_lpop_count[StrictRedis]"
+ "test/test_fakeredis.py::test_rpop_count[StrictRedis]"
+ "test/test_fakeredis.py::test_zadd_minus_zero[StrictRedis]"
+ "test/test_mixins/test_pubsub_commands.py::test_pubsub_channels[StrictRedis]"
+ )
+ local EPYTEST_IGNORE=(
+ # these tests fail a lot...
+ test/test_hypothesis.py
+ )
+ local args=(
+ # tests requiring lupa (lua support)
+ -k 'not test_eval and not test_lua and not test_script'
+ )
+ epytest "${args[@]}"
+}
+
+src_test() {
+ local redis_pid="${T}"/redis.pid
+ local redis_port=6379
+
+ einfo "Spawning Redis"
+ einfo "NOTE: Port ${redis_port} must be free"
+ "${EPREFIX}"/usr/sbin/redis-server - <<- EOF || die "Unable to start redis server"
+ daemonize yes
+ pidfile ${redis_pid}
+ port ${redis_port}
+ bind 127.0.0.1
+ EOF
+
+ # Run the tests
+ distutils-r1_src_test
+
+ # Clean up afterwards
+ kill "$(<"${redis_pid}")" || die
+}