diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-03-21 20:45:05 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-03-21 21:06:20 +0100 |
commit | 2db0bd386949ba097bcf1d7c15b54020eefb9dbf (patch) | |
tree | f9629d4873809cc8c2ad7e2bf2feb645f2a3f314 /dev-python/redis | |
parent | dev-python/pyzmq: Bump to 25.0.2 (diff) | |
download | gentoo-2db0bd386949ba097bcf1d7c15b54020eefb9dbf.tar.gz gentoo-2db0bd386949ba097bcf1d7c15b54020eefb9dbf.tar.bz2 gentoo-2db0bd386949ba097bcf1d7c15b54020eefb9dbf.zip |
dev-python/redis: Bump to 4.5.2
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/redis')
-rw-r--r-- | dev-python/redis/Manifest | 1 | ||||
-rw-r--r-- | dev-python/redis/redis-4.5.2.ebuild | 83 |
2 files changed, 84 insertions, 0 deletions
diff --git a/dev-python/redis/Manifest b/dev-python/redis/Manifest index f700d36a9508..edad50224523 100644 --- a/dev-python/redis/Manifest +++ b/dev-python/redis/Manifest @@ -1 +1,2 @@ DIST redis-py-4.5.1.gh.tar.gz 4737828 BLAKE2B ce4f44c32e0c0bf050c868725e41b037dc9c8bc1915f83994db5196a44fc618acfb9670e61e640c4c756c9e66794a96f9d4d140c58fccc06b181dce040275377 SHA512 bbee0aee1568a95a591c9083a901c2f47dfb5c9cfa9186b4a47a6575691cd7634d2c461fad84c54fc6df53a83029d1facd19e7c59cafa4331254ef8f04967cb6 +DIST redis-py-4.5.2.gh.tar.gz 4738198 BLAKE2B d3b566bee468c46536811580c21a66b94b157079858502edd2f2359944b1029e56370b5763ba27b55f446cb6eef45c99e0132547d02b4dcb63a0d910c7c477ad SHA512 6f4a30051749b31a0fcde1e61996fb9a92e71094a8f3dabeaef8aa1794431e59be8c67f337f6476b73eaca78ab14edd6e2c4de4621b9311f9124e70c68c1eec1 diff --git a/dev-python/redis/redis-4.5.2.ebuild b/dev-python/redis/redis-4.5.2.ebuild new file mode 100644 index 000000000000..37fbc3edbe6d --- /dev/null +++ b/dev-python/redis/redis-4.5.2.ebuild @@ -0,0 +1,83 @@ +# 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} pypy3 ) + +inherit distutils-r1 + +MY_P=redis-py-${PV} +DESCRIPTION="Python client for Redis key-value store" +HOMEPAGE=" + https://github.com/redis/redis-py/ + https://pypi.org/project/redis/ +" +SRC_URI=" + https://github.com/redis/redis-py/archive/v${PV}.tar.gz + -> ${MY_P}.gh.tar.gz +" +S=${WORKDIR}/${MY_P} + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86" + +RDEPEND=" + $(python_gen_cond_dep ' + >=dev-python/async-timeout-4.0.2[${PYTHON_USEDEP}] + ' 3.{9..10}) +" +BDEPEND=" + test? ( + dev-db/redis + dev-python/pytest-asyncio[${PYTHON_USEDEP}] + dev-python/pytest-timeout[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +python_test() { + local EPYTEST_DESELECT=( + # Flaky test + tests/test_pubsub.py::TestPubSubDeadlock::test_pubsub_deadlock + # TODO + tests/test_commands.py::TestRedisCommands::test_acl_list + # redis-7 different return + tests/test_commands.py::TestRedisCommands::test_xautoclaim + ) + + # TODO: try to run more servers? + epytest -m "not redismod and not onlycluster and not replica and not ssl" +} + +src_test() { + local redis_pid="${T}"/redis.pid + local redis_port=6379 + + if has_version ">=dev-db/redis-7"; then + local extra_conf=" + enable-debug-command yes + enable-module-command yes + " + fi + + # Spawn Redis itself for testing purposes + 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 ::1 + ${extra_conf} + EOF + + # Run the tests + distutils-r1_src_test + + # Clean up afterwards + kill "$(<"${redis_pid}")" || die +} |