commit:     ff5ac153997aa29a0afb8b2b648e56a8d1fbe405
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 27 18:52:26 2022 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Mon Jun 27 19:08:36 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff5ac153

dev-python/redis-py: add 4.3.4

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-python/redis-py/Manifest              |  1 +
 dev-python/redis-py/redis-py-4.3.4.ebuild | 72 +++++++++++++++++++++++++++++++
 2 files changed, 73 insertions(+)

diff --git a/dev-python/redis-py/Manifest b/dev-python/redis-py/Manifest
index 9e212f46c8a5..0397ed9f541a 100644
--- a/dev-python/redis-py/Manifest
+++ b/dev-python/redis-py/Manifest
@@ -1,3 +1,4 @@
 DIST redis-py-4.1.4.tar.gz 2352106 BLAKE2B 
a7f40d381e3e1d295d2ce88f0adb897704d0065ee7d5bb00108c2c8c67ef649ea63d4ca06dbbe2b21b2f92d70d96f8e2d32a7992ecf702bb4c73589f30c1bae8
 SHA512 
6dd1bc7622529382901b2fe6e63a5f9d6a4b89175b486c879a63cc8f0e708737431dfe5b834124f0d33f34540ac54813a0e6953bbed3a9dbd226597b4b1cb3ae
 DIST redis-py-4.2.2.tar.gz 2421362 BLAKE2B 
ab59a649e8bc08d706536f994f0462505cea39828072884739b1a6434b45fd120e3b8acb51e8e88ec9fe0ce9acc0bfd6a5ff92bb67080724c7b121ef539af16f
 SHA512 
80673d48cd97af1c5ebc67e919f16891ccb20cd30bc06619ddffeb117ad87f82b73f9b9bda6d36829bc51a35aa3c9b2af7c879ec665cc9664bdd86ac6510095b
 DIST redis-py-4.3.3.gh.tar.gz 4610718 BLAKE2B 
7edcade0d1d192d49480b10ddd635934dbb8a580e3b92e4cf2fec995520fa26f805f258f1af0a22077c1421f6a7234674c5fbba0da029d0346ab2019b40c88df
 SHA512 
f16e8367258c3042ab687b7435cf481a64e89acd0687f6ee5ff1babe7b0bf120300e38601e8c3c7f0d8a864774c5f77e856a0f720e9eae8bc3a1711fb342e62b
+DIST redis-py-4.3.4.gh.tar.gz 4613714 BLAKE2B 
cea5a6455160c67c9ab3b8f9de8ae47aed97e7bea1e408ce1a001afe3e0c4a7a14220887504fa40c749d15be9d89f77e36b6f7a785e0ff22a49037b6ef245e87
 SHA512 
55dd00c15cedb82cb5edd46b1f18f32c0accb8c85b1b94bbfe04591dc07f6151ced81cbfca8ac6fe88a6743bf5abc50309ea23bef96bf4332a712979c61ea0b7

diff --git a/dev-python/redis-py/redis-py-4.3.4.ebuild 
b/dev-python/redis-py/redis-py-4.3.4.ebuild
new file mode 100644
index 000000000000..2ff14c069707
--- /dev/null
+++ b/dev-python/redis-py/redis-py-4.3.4.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
+
+inherit distutils-r1
+
+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
+               -> ${P}.gh.tar.gz
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+RDEPEND="
+       >=dev-python/async_timeout-4.0.2[${PYTHON_USEDEP}]
+       >=dev-python/deprecated-1.2.3[${PYTHON_USEDEP}]
+       >=dev-python/packaging-20.4[${PYTHON_USEDEP}]
+"
+BDEPEND="
+       test? (
+               <dev-db/redis-7
+               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: 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
+
+       # Spawn Redis itself for testing purposes
+       # NOTE: On sam@'s machine, spawning Redis can hang in the sandbox.
+       # I'm not restricting tests yet because this doesn't happen for anyone 
else AFAICT.
+       einfo "Spawning Redis"
+       einfo "NOTE: Port ${redis_port} must be free"
+       # "${EPREFIX}"/usr/sbin/redis-server - <<< "${redis_test_config}" || die
+       "${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
+}

Reply via email to