summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-04-05 02:10:33 +0100
committerSam James <sam@gentoo.org>2022-04-05 02:10:33 +0100
commit36ef93197dc8249271b1a7a2bf9a1081d72a0764 (patch)
treec5c438736265742691cc2b721282adab2444e5f4 /dev-python/redis-py
parentsys-apps/hwdata: add 0.358 (diff)
downloadgentoo-36ef93197dc8249271b1a7a2bf9a1081d72a0764.tar.gz
gentoo-36ef93197dc8249271b1a7a2bf9a1081d72a0764.tar.bz2
gentoo-36ef93197dc8249271b1a7a2bf9a1081d72a0764.zip
dev-python/redis-py: add 4.2.2
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/redis-py')
-rw-r--r--dev-python/redis-py/Manifest1
-rw-r--r--dev-python/redis-py/redis-py-4.2.2.ebuild82
2 files changed, 83 insertions, 0 deletions
diff --git a/dev-python/redis-py/Manifest b/dev-python/redis-py/Manifest
index 9100e8f6acf8..31a66977e16c 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.0.tar.gz 2419627 BLAKE2B a4429e17dc90289032c5b98cd482fc6e1349b4b63b2c3f289be1df9d0c667a9f568cbee71d34f88c140fbebf2b0061e9bb3426f1548bccf3c0767c040419251b SHA512 3c4c7f859e63ebadf8d4b01ce14d789caffa18b1f177b6a2269737cb20259dc0165773b1c838c3c08edeea790976183b156f886815b42ea709b4b3a0f2aa3354
DIST redis-py-4.2.1.tar.gz 2420026 BLAKE2B 2e2ef024dc22ad8447bd0b0c9e2318b5c55568e7a93a73f8f264e5af839d50c7c44d98669d19ddc2a9a6440eaafa8842ebeb749b9b22db83d691dab5421fd774 SHA512 3499126d2c19f599e5bc026c3b66ec99639b2746ef0091ba8bea45cf969d39831e1f2ad47f0ba4c65131d4f248320a8b7d2862c5abb289e46555cd3fc6239674
+DIST redis-py-4.2.2.tar.gz 2421362 BLAKE2B ab59a649e8bc08d706536f994f0462505cea39828072884739b1a6434b45fd120e3b8acb51e8e88ec9fe0ce9acc0bfd6a5ff92bb67080724c7b121ef539af16f SHA512 80673d48cd97af1c5ebc67e919f16891ccb20cd30bc06619ddffeb117ad87f82b73f9b9bda6d36829bc51a35aa3c9b2af7c879ec665cc9664bdd86ac6510095b
diff --git a/dev-python/redis-py/redis-py-4.2.2.ebuild b/dev-python/redis-py/redis-py-4.2.2.ebuild
new file mode 100644
index 000000000000..b9f87178642f
--- /dev/null
+++ b/dev-python/redis-py/redis-py-4.2.2.ebuild
@@ -0,0 +1,82 @@
+# 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..10} pypy3 )
+
+inherit distutils-r1
+
+MY_PN="redis"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Python client for Redis key-value store"
+HOMEPAGE="https://github.com/redis/redis-py"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+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
+ 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
+
+ # Needs a second Redis running
+ tests/test_commands.py::TestRedisCommands::test_sync
+ tests/test_commands.py::TestRedisCommands::test_psync
+ )
+
+ local EPYTEST_IGNORE=(
+ # SSL tests need Docker/stunnel:
+ # https://github.com/redis/redis-py/commit/18c6809b761bc6755349e1d7e08e74e857ec2c65
+ tests/test_ssl.py
+
+ # Needs multiple Redises running
+ tests/test_cluster.py
+ )
+
+ epytest -k "not redismod 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
+}