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: Mon, 22 Nov 2021 23:04:33
Message-Id: 1637622263.f5e17a96d1a32f638be4ccb3c4bccf2bdf981e18.mgorny@gentoo
1 commit: f5e17a96d1a32f638be4ccb3c4bccf2bdf981e18
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 22 22:37:32 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 22 23:04:23 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5e17a96
7
8 dev-python/redis-py: Bump to 4.0.2
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/metadata.xml | 2 +-
14 dev-python/redis-py/redis-py-4.0.2.ebuild | 61 +++++++++++++++++++++++++++++++
15 3 files changed, 63 insertions(+), 1 deletion(-)
16
17 diff --git a/dev-python/redis-py/Manifest b/dev-python/redis-py/Manifest
18 index fb2f7d6f986a..60c1bce0736f 100644
19 --- a/dev-python/redis-py/Manifest
20 +++ b/dev-python/redis-py/Manifest
21 @@ -1 +1,2 @@
22 DIST redis-py-3.5.3.tar.gz 141112 BLAKE2B b953d553a3cfa2d6ba6f5aa35dfaf93865acbfad0e901a96082c3b1c027dc23b6ceedde185f24e86772522fbbf4f0a4d18e115a6b40aff6a65450bbe397d5c07 SHA512 eae6ac6b3e0f1366a9c29e5e2d9a5210e4627e62e3006159b1c290f36cd9c1c2c12cafe0944f7a010e04632b517874f230aa9411491993b7ecf2080546217206
23 +DIST redis-py-4.0.2.tar.gz 2262717 BLAKE2B 7db99843b4ee354b0841de1cacca001901b0614868e6cd545edb0f3705b7dc7d7a0ee755e2184ec1fb080a845a2f193ff5ab5a4dd99006eed6b9a1c89fbee131 SHA512 3f73ddd2ceb551fa447cfb4ecdc1d393957bbfd8c184ae3d357f9f47fff860f1c4684ec0fc3cb85fea530454456c17a98a2a56e592bef4cd9ad17bb405c1a0f7
24
25 diff --git a/dev-python/redis-py/metadata.xml b/dev-python/redis-py/metadata.xml
26 index 93aefe765a0d..998ac9ce8e08 100644
27 --- a/dev-python/redis-py/metadata.xml
28 +++ b/dev-python/redis-py/metadata.xml
29 @@ -12,6 +12,6 @@
30 <stabilize-allarches/>
31 <upstream>
32 <remote-id type="pypi">redis</remote-id>
33 - <remote-id type="github">andymccurdy/redis-py</remote-id>
34 + <remote-id type="github">redis/redis-py</remote-id>
35 </upstream>
36 </pkgmetadata>
37
38 diff --git a/dev-python/redis-py/redis-py-4.0.2.ebuild b/dev-python/redis-py/redis-py-4.0.2.ebuild
39 new file mode 100644
40 index 000000000000..ccefac5ea7ba
41 --- /dev/null
42 +++ b/dev-python/redis-py/redis-py-4.0.2.ebuild
43 @@ -0,0 +1,61 @@
44 +# Copyright 1999-2021 Gentoo Authors
45 +# Distributed under the terms of the GNU General Public License v2
46 +
47 +EAPI=8
48 +
49 +PYTHON_COMPAT=( python3_{9..10} pypy3 )
50 +inherit distutils-r1
51 +
52 +MY_PN="redis"
53 +MY_P="${MY_PN}-${PV}"
54 +
55 +DESCRIPTION="Python client for Redis key-value store"
56 +HOMEPAGE="https://github.com/redis/redis-py"
57 +SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz -> ${P}.tar.gz"
58 +S="${WORKDIR}/${MY_P}"
59 +
60 +LICENSE="MIT"
61 +SLOT="0"
62 +KEYWORDS="~amd64 ~arm64 ~x86"
63 +
64 +RDEPEND="
65 + dev-python/deprecated[${PYTHON_USEDEP}]"
66 +BDEPEND="
67 + test? (
68 + dev-db/redis
69 + )
70 +"
71 +
72 +distutils_enable_tests pytest
73 +
74 +python_test() {
75 + local redis_pid="${T}"/redis.pid
76 + local redis_port=6379
77 + local redis_test_config="
78 + daemonize yes
79 + pidfile ${redis_pid}
80 + port ${redis_port}
81 + bind 127.0.0.1
82 + "
83 +
84 + # Spawn Redis itself for testing purposes
85 + # NOTE: On sam@'s machine, spawning Redis can hang in the sandbox.
86 + # I'm not restricting tests yet because this doesn't happen for anyone else AFAICT.
87 + elog "Spawning Redis"
88 + elog "NOTE: Port ${redis_port} must be free"
89 + "${EPREFIX}"/usr/sbin/redis-server - <<< "${redis_test_config}" || die
90 +
91 + # Run the tests
92 + epytest -k "not redismod"
93 +
94 + # Clean up afterwards
95 + local pid=$(<"${redis_pid}")
96 + kill "${pid}" || die
97 + local retries=10
98 + while [[ -f ${redis_pid} ]]; do
99 + sleep 1
100 + if [[ $(( retries-- )) -eq 0 ]]; then
101 + die "redis did not stop"
102 + fi
103 + done
104 +}