Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/redis-py/
Date: Fri, 03 Jun 2022 02:19:37
Message-Id: 1654222765.91acf8fda8987e953bb93d3af666e961e8942173.sam@gentoo
1 commit: 91acf8fda8987e953bb93d3af666e961e8942173
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 3 02:19:10 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 3 02:19:25 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91acf8fd
7
8 dev-python/redis-py: add 4.3.3
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 dev-python/redis-py/Manifest | 1 +
13 dev-python/redis-py/redis-py-4.3.3.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 e4e17c046479..00895337b6f1 100644
18 --- a/dev-python/redis-py/Manifest
19 +++ b/dev-python/redis-py/Manifest
20 @@ -3,3 +3,4 @@ DIST redis-py-4.2.2.tar.gz 2421362 BLAKE2B ab59a649e8bc08d706536f994f0462505cea3
21 DIST redis-py-4.3.0.gh.tar.gz 4605505 BLAKE2B a7cdf8941f99291f6c6f53e6b11b1cd45fd64d0d96e11848d648964518a970275152c00c3aec3a0342ffc5a4805624344076154d007684ce90137f37df4d90f7 SHA512 881f250f04cd0376d2e617ff07cba3c4f987574d64b0813890310412293c7825bb11a5117b65b27dad05bbdff250f44a736d542ee116034b7a644c6e58f981fd
22 DIST redis-py-4.3.1.gh.tar.gz 4605537 BLAKE2B 239dd9be0e6c30dbaeeb609f222802f33e4a4e4a743fe1f348f542fe899b89e47ad9513bf99db713d3cbcb13df0e6593d4631745c3afc3368f8a9e8333b759a8 SHA512 8d38876fbf3593825bf593188a9749bec0f652907f510657e32043ed26fd6d59b1554870f59af65939754500645e4c4c8f15bcb8eab1385a0640c374aa938643
23 DIST redis-py-4.3.2.gh.tar.gz 4610682 BLAKE2B 1fe8a0aadfbc094fb0904cf2ed71a8d14245cf9f09638073f2fdc5713560cf66d5e00eaef7ab2ad9d68f00b838c5b762c95ca4589075db72b16cfaf5aa31477a SHA512 0d6458c4ecc676a1af6ec96648eecc30e872cbf5546701ee6b8b06feb0f30cab2bfd5de8700ea3e9628ec7cdc8e851460fa248963a745ac73cc0611c6a8787e5
24 +DIST redis-py-4.3.3.gh.tar.gz 4610718 BLAKE2B 7edcade0d1d192d49480b10ddd635934dbb8a580e3b92e4cf2fec995520fa26f805f258f1af0a22077c1421f6a7234674c5fbba0da029d0346ab2019b40c88df SHA512 f16e8367258c3042ab687b7435cf481a64e89acd0687f6ee5ff1babe7b0bf120300e38601e8c3c7f0d8a864774c5f77e856a0f720e9eae8bc3a1711fb342e62b
25
26 diff --git a/dev-python/redis-py/redis-py-4.3.3.ebuild b/dev-python/redis-py/redis-py-4.3.3.ebuild
27 new file mode 100644
28 index 000000000000..2ff14c069707
29 --- /dev/null
30 +++ b/dev-python/redis-py/redis-py-4.3.3.ebuild
31 @@ -0,0 +1,72 @@
32 +# Copyright 1999-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=8
36 +
37 +DISTUTILS_USE_PEP517=setuptools
38 +PYTHON_COMPAT=( python3_{8..11} pypy3 )
39 +
40 +inherit distutils-r1
41 +
42 +DESCRIPTION="Python client for Redis key-value store"
43 +HOMEPAGE="
44 + https://github.com/redis/redis-py/
45 + https://pypi.org/project/redis/
46 +"
47 +SRC_URI="
48 + https://github.com/redis/redis-py/archive/v${PV}.tar.gz
49 + -> ${P}.gh.tar.gz
50 +"
51 +
52 +LICENSE="MIT"
53 +SLOT="0"
54 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
55 +
56 +RDEPEND="
57 + >=dev-python/async_timeout-4.0.2[${PYTHON_USEDEP}]
58 + >=dev-python/deprecated-1.2.3[${PYTHON_USEDEP}]
59 + >=dev-python/packaging-20.4[${PYTHON_USEDEP}]
60 +"
61 +BDEPEND="
62 + test? (
63 + <dev-db/redis-7
64 + dev-python/pytest-asyncio[${PYTHON_USEDEP}]
65 + dev-python/pytest-timeout[${PYTHON_USEDEP}]
66 + )
67 +"
68 +
69 +distutils_enable_tests pytest
70 +
71 +python_test() {
72 + local EPYTEST_DESELECT=(
73 + # Flaky test
74 + tests/test_pubsub.py::TestPubSubDeadlock::test_pubsub_deadlock
75 + )
76 +
77 + # TODO: try to run more servers?
78 + epytest -m "not redismod and not onlycluster and not replica and not ssl"
79 +}
80 +
81 +src_test() {
82 + local redis_pid="${T}"/redis.pid
83 + local redis_port=6379
84 +
85 + # Spawn Redis itself for testing purposes
86 + # NOTE: On sam@'s machine, spawning Redis can hang in the sandbox.
87 + # I'm not restricting tests yet because this doesn't happen for anyone else AFAICT.
88 + einfo "Spawning Redis"
89 + einfo "NOTE: Port ${redis_port} must be free"
90 + # "${EPREFIX}"/usr/sbin/redis-server - <<< "${redis_test_config}" || die
91 + "${EPREFIX}"/usr/sbin/redis-server - <<- EOF || die "Unable to start redis server"
92 + daemonize yes
93 + pidfile ${redis_pid}
94 + port ${redis_port}
95 + bind 127.0.0.1
96 + EOF
97 +
98 + # Run the tests
99 + distutils-r1_src_test
100 +
101 + # Clean up afterwards
102 + kill "$(<"${redis_pid}")" || die
103 +}