Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/redis-py/
Date: Thu, 31 Mar 2022 11:33:10
Message-Id: 1648726376.7180d55e08bb8e412d89169a9526562c9905584f.mgorny@gentoo
1 commit: 7180d55e08bb8e412d89169a9526562c9905584f
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 31 10:19:59 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 31 11:32:56 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7180d55e
7
8 dev-python/redis-py: Bump to 4.2.1
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/redis-py/Manifest | 1 +
13 dev-python/redis-py/redis-py-4.2.1.ebuild | 81 +++++++++++++++++++++++++++++++
14 2 files changed, 82 insertions(+)
15
16 diff --git a/dev-python/redis-py/Manifest b/dev-python/redis-py/Manifest
17 index ca8bda70fdd7..9100e8f6acf8 100644
18 --- a/dev-python/redis-py/Manifest
19 +++ b/dev-python/redis-py/Manifest
20 @@ -1,2 +1,3 @@
21 DIST redis-py-4.1.4.tar.gz 2352106 BLAKE2B a7f40d381e3e1d295d2ce88f0adb897704d0065ee7d5bb00108c2c8c67ef649ea63d4ca06dbbe2b21b2f92d70d96f8e2d32a7992ecf702bb4c73589f30c1bae8 SHA512 6dd1bc7622529382901b2fe6e63a5f9d6a4b89175b486c879a63cc8f0e708737431dfe5b834124f0d33f34540ac54813a0e6953bbed3a9dbd226597b4b1cb3ae
22 DIST redis-py-4.2.0.tar.gz 2419627 BLAKE2B a4429e17dc90289032c5b98cd482fc6e1349b4b63b2c3f289be1df9d0c667a9f568cbee71d34f88c140fbebf2b0061e9bb3426f1548bccf3c0767c040419251b SHA512 3c4c7f859e63ebadf8d4b01ce14d789caffa18b1f177b6a2269737cb20259dc0165773b1c838c3c08edeea790976183b156f886815b42ea709b4b3a0f2aa3354
23 +DIST redis-py-4.2.1.tar.gz 2420026 BLAKE2B 2e2ef024dc22ad8447bd0b0c9e2318b5c55568e7a93a73f8f264e5af839d50c7c44d98669d19ddc2a9a6440eaafa8842ebeb749b9b22db83d691dab5421fd774 SHA512 3499126d2c19f599e5bc026c3b66ec99639b2746ef0091ba8bea45cf969d39831e1f2ad47f0ba4c65131d4f248320a8b7d2862c5abb289e46555cd3fc6239674
24
25 diff --git a/dev-python/redis-py/redis-py-4.2.1.ebuild b/dev-python/redis-py/redis-py-4.2.1.ebuild
26 new file mode 100644
27 index 000000000000..bdf92ea29be5
28 --- /dev/null
29 +++ b/dev-python/redis-py/redis-py-4.2.1.ebuild
30 @@ -0,0 +1,81 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +DISTUTILS_USE_PEP517=setuptools
37 +PYTHON_COMPAT=( python3_{8..10} pypy3 )
38 +
39 +inherit distutils-r1
40 +
41 +MY_PN="redis"
42 +MY_P="${MY_PN}-${PV}"
43 +
44 +DESCRIPTION="Python client for Redis key-value store"
45 +HOMEPAGE="https://github.com/redis/redis-py"
46 +SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz -> ${P}.tar.gz"
47 +S="${WORKDIR}/${MY_P}"
48 +
49 +LICENSE="MIT"
50 +SLOT="0"
51 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
52 +
53 +RDEPEND="
54 + >=dev-python/async_timeout-4.0.2[${PYTHON_USEDEP}]
55 + >=dev-python/deprecated-1.2.3[${PYTHON_USEDEP}]
56 + >=dev-python/packaging-20.4[${PYTHON_USEDEP}]
57 +"
58 +BDEPEND="
59 + test? (
60 + dev-db/redis
61 + dev-python/pytest-timeout[${PYTHON_USEDEP}]
62 + )
63 +"
64 +
65 +distutils_enable_tests pytest
66 +
67 +python_test() {
68 + local EPYTEST_DESELECT=(
69 + # Flaky test
70 + tests/test_pubsub.py::TestPubSubDeadlock::test_pubsub_deadlock
71 +
72 + # Needs a second Redis running
73 + tests/test_commands.py::TestRedisCommands::test_sync
74 + tests/test_commands.py::TestRedisCommands::test_psync
75 + )
76 +
77 + local EPYTEST_IGNORE=(
78 + # SSL tests need Docker/stunnel:
79 + # https://github.com/redis/redis-py/commit/18c6809b761bc6755349e1d7e08e74e857ec2c65
80 + tests/test_ssl.py
81 +
82 + # Needs multiple Redises running
83 + tests/test_cluster.py
84 + )
85 +
86 + epytest -k "not redismod and not ssl"
87 +}
88 +
89 +src_test() {
90 + local redis_pid="${T}"/redis.pid
91 + local redis_port=6379
92 +
93 + # Spawn Redis itself for testing purposes
94 + # NOTE: On sam@'s machine, spawning Redis can hang in the sandbox.
95 + # I'm not restricting tests yet because this doesn't happen for anyone else AFAICT.
96 + einfo "Spawning Redis"
97 + einfo "NOTE: Port ${redis_port} must be free"
98 + # "${EPREFIX}"/usr/sbin/redis-server - <<< "${redis_test_config}" || die
99 + "${EPREFIX}"/usr/sbin/redis-server - <<- EOF || die "Unable to start redis server"
100 + daemonize yes
101 + pidfile ${redis_pid}
102 + port ${redis_port}
103 + bind 127.0.0.1
104 + EOF
105 +
106 + # Run the tests
107 + distutils-r1_src_test
108 +
109 + # Clean up afterwards
110 + kill "$(<"${redis_pid}")" || die
111 +}