Gentoo Archives: gentoo-commits

From: Arthur Zamarin <arthurzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/redis-py/
Date: Thu, 27 Jan 2022 19:37:16
Message-Id: 1643312209.47bb2f82160eaa82af7df45e65e7e4f82e594b1f.arthurzam@gentoo
1 commit: 47bb2f82160eaa82af7df45e65e7e4f82e594b1f
2 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 27 19:36:21 2022 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 27 19:36:49 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47bb2f82
7
8 dev-python/redis-py: add 4.1.2
9
10 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
11
12 dev-python/redis-py/Manifest | 1 +
13 dev-python/redis-py/redis-py-4.1.2.ebuild | 77 +++++++++++++++++++++++++++++++
14 2 files changed, 78 insertions(+)
15
16 diff --git a/dev-python/redis-py/Manifest b/dev-python/redis-py/Manifest
17 index 8d2196ffa355..216f67127eae 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.0.tar.gz 2346542 BLAKE2B 3d59f904f376df7bca14dcd7bc8547d7a7b41b8d934a50ade6dbf5e74f3da8deef59b3b7cf683fe3c7389859f76fe1d3307f91b52250da945f91b90c629640ab SHA512 85cd09570f4faf34a735befd0677aa8ca2cb0d62b0285c4c040380c2440f2774e47762ec4219381294465343353a15804b96f06b4d6eefa7159a224eb9e72001
22 DIST redis-py-4.1.1.tar.gz 2349319 BLAKE2B adebda19239e1fd4cf685c0de7a9b2c2fc4e8f23df0e80f2ecdf5f4b9b8b2698fbab613975bd380ea74dc275710d8ed58ee0720486c079bf554612cb7d8b392e SHA512 a974a910dcbaf75516e311badbe6e019cdce668a6d8cd918503934bb92bf97f7ea373fae32139f89a9eecdb360184ae42d24d742ef8b008e95eae648bd992e64
23 +DIST redis-py-4.1.2.tar.gz 2349862 BLAKE2B 3e68918654e63c3403f2408350b2a877027a3c3990b623818332e0e77e1fbaa413e85912ea586a90788a87e0206ebe408ab55df522864dc534907c31a690c0c1 SHA512 beb6e50051eae61e84e7cf37f9f3e3efbc404d49e506b0b3bdae0d0c45fd940f12c801434a6394505519bf327b5933c076ad4f8c66ad812441bc08b3aa682542
24
25 diff --git a/dev-python/redis-py/redis-py-4.1.2.ebuild b/dev-python/redis-py/redis-py-4.1.2.ebuild
26 new file mode 100644
27 index 000000000000..9f99d80d3b5d
28 --- /dev/null
29 +++ b/dev-python/redis-py/redis-py-4.1.2.ebuild
30 @@ -0,0 +1,77 @@
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 +inherit distutils-r1
39 +
40 +MY_PN="redis"
41 +MY_P="${MY_PN}-${PV}"
42 +
43 +DESCRIPTION="Python client for Redis key-value store"
44 +HOMEPAGE="https://github.com/redis/redis-py"
45 +SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz -> ${P}.tar.gz"
46 +S="${WORKDIR}/${MY_P}"
47 +
48 +LICENSE="MIT"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
51 +
52 +RDEPEND="
53 + dev-python/deprecated[${PYTHON_USEDEP}]"
54 +BDEPEND="
55 + test? (
56 + dev-db/redis
57 + dev-python/pytest-timeout[${PYTHON_USEDEP}]
58 + )
59 +"
60 +
61 +distutils_enable_tests pytest
62 +
63 +python_test() {
64 + local EPYTEST_DESELECT=(
65 + # Flaky test
66 + tests/test_pubsub.py::TestPubSubDeadlock::test_pubsub_deadlock
67 +
68 + # Needs a second Redis running
69 + tests/test_commands.py::TestRedisCommands::test_sync
70 + tests/test_commands.py::TestRedisCommands::test_psync
71 + )
72 +
73 + local EPYTEST_IGNORE=(
74 + # SSL tests need Docker/stunnel:
75 + # https://github.com/redis/redis-py/commit/18c6809b761bc6755349e1d7e08e74e857ec2c65
76 + tests/test_ssl.py
77 +
78 + # Needs multiple Redises running
79 + tests/test_cluster.py
80 + )
81 +
82 + epytest -k "not redismod and not ssl"
83 +}
84 +
85 +src_test() {
86 + local redis_pid="${T}"/redis.pid
87 + local redis_port=6379
88 +
89 + # Spawn Redis itself for testing purposes
90 + # NOTE: On sam@'s machine, spawning Redis can hang in the sandbox.
91 + # I'm not restricting tests yet because this doesn't happen for anyone else AFAICT.
92 + einfo "Spawning Redis"
93 + einfo "NOTE: Port ${redis_port} must be free"
94 + # "${EPREFIX}"/usr/sbin/redis-server - <<< "${redis_test_config}" || die
95 + "${EPREFIX}"/usr/sbin/redis-server - <<- EOF || die "Unable to start redis server"
96 + daemonize yes
97 + pidfile ${redis_pid}
98 + port ${redis_port}
99 + bind 127.0.0.1
100 + EOF
101 +
102 + # Run the tests
103 + distutils-r1_src_test
104 +
105 + # Clean up afterwards
106 + kill "$(<"${redis_pid}")" || die
107 +}