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, 09 May 2022 09:17:36
Message-Id: 1652087195.34a69a69dd0d8b5f866d10743ef9e3ee483fab88.mgorny@gentoo
1 commit: 34a69a69dd0d8b5f866d10743ef9e3ee483fab88
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 9 08:56:32 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon May 9 09:06:35 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34a69a69
7
8 dev-python/redis-py: Bump to 4.3.0
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.3.0.ebuild | 72 +++++++++++++++++++++++++++++++
14 2 files changed, 73 insertions(+)
15
16 diff --git a/dev-python/redis-py/Manifest b/dev-python/redis-py/Manifest
17 index 05c8cd6700ba..d7a67e552f33 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.2.tar.gz 2421362 BLAKE2B ab59a649e8bc08d706536f994f0462505cea39828072884739b1a6434b45fd120e3b8acb51e8e88ec9fe0ce9acc0bfd6a5ff92bb67080724c7b121ef539af16f SHA512 80673d48cd97af1c5ebc67e919f16891ccb20cd30bc06619ddffeb117ad87f82b73f9b9bda6d36829bc51a35aa3c9b2af7c879ec665cc9664bdd86ac6510095b
23 +DIST redis-py-4.3.0.gh.tar.gz 4605505 BLAKE2B a7cdf8941f99291f6c6f53e6b11b1cd45fd64d0d96e11848d648964518a970275152c00c3aec3a0342ffc5a4805624344076154d007684ce90137f37df4d90f7 SHA512 881f250f04cd0376d2e617ff07cba3c4f987574d64b0813890310412293c7825bb11a5117b65b27dad05bbdff250f44a736d542ee116034b7a644c6e58f981fd
24
25 diff --git a/dev-python/redis-py/redis-py-4.3.0.ebuild b/dev-python/redis-py/redis-py-4.3.0.ebuild
26 new file mode 100644
27 index 000000000000..9f000b888e29
28 --- /dev/null
29 +++ b/dev-python/redis-py/redis-py-4.3.0.ebuild
30 @@ -0,0 +1,72 @@
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 +DESCRIPTION="Python client for Redis key-value store"
42 +HOMEPAGE="
43 + https://github.com/redis/redis-py/
44 + https://pypi.org/project/redis/
45 +"
46 +SRC_URI="
47 + https://github.com/redis/redis-py/archive/v${PV}.tar.gz
48 + -> ${P}.gh.tar.gz
49 +"
50 +
51 +LICENSE="MIT"
52 +SLOT="0"
53 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
54 +
55 +RDEPEND="
56 + >=dev-python/async_timeout-4.0.2[${PYTHON_USEDEP}]
57 + >=dev-python/deprecated-1.2.3[${PYTHON_USEDEP}]
58 + >=dev-python/packaging-20.4[${PYTHON_USEDEP}]
59 +"
60 +BDEPEND="
61 + test? (
62 + <dev-db/redis-7
63 + dev-python/pytest-asyncio[${PYTHON_USEDEP}]
64 + dev-python/pytest-timeout[${PYTHON_USEDEP}]
65 + )
66 +"
67 +
68 +distutils_enable_tests pytest
69 +
70 +python_test() {
71 + local EPYTEST_DESELECT=(
72 + # Flaky test
73 + tests/test_pubsub.py::TestPubSubDeadlock::test_pubsub_deadlock
74 + )
75 +
76 + # TODO: try to run more servers?
77 + epytest -m "not redismod and not onlycluster and not replica and not ssl"
78 +}
79 +
80 +src_test() {
81 + local redis_pid="${T}"/redis.pid
82 + local redis_port=6379
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 + einfo "Spawning Redis"
88 + einfo "NOTE: Port ${redis_port} must be free"
89 + # "${EPREFIX}"/usr/sbin/redis-server - <<< "${redis_test_config}" || die
90 + "${EPREFIX}"/usr/sbin/redis-server - <<- EOF || die "Unable to start redis server"
91 + daemonize yes
92 + pidfile ${redis_pid}
93 + port ${redis_port}
94 + bind 127.0.0.1
95 + EOF
96 +
97 + # Run the tests
98 + distutils-r1_src_test
99 +
100 + # Clean up afterwards
101 + kill "$(<"${redis_pid}")" || die
102 +}