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/fakeredis/
Date: Sun, 28 Nov 2021 22:02:06
Message-Id: 1638136918.f88cdeea25a4624f3ca3ecaaf2a34b662767bcb6.mgorny@gentoo
1 commit: f88cdeea25a4624f3ca3ecaaf2a34b662767bcb6
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 28 21:22:11 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 28 22:01:58 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f88cdeea
7
8 dev-python/fakeredis: Bump to 1.7.0
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/fakeredis/Manifest | 1 +
13 dev-python/fakeredis/fakeredis-1.7.0.ebuild | 80 +++++++++++++++++++++++++++++
14 2 files changed, 81 insertions(+)
15
16 diff --git a/dev-python/fakeredis/Manifest b/dev-python/fakeredis/Manifest
17 index cf11b444080a..5fc0952a2280 100644
18 --- a/dev-python/fakeredis/Manifest
19 +++ b/dev-python/fakeredis/Manifest
20 @@ -1,3 +1,4 @@
21 DIST fakeredis-1.5.1.gh.tar.gz 67064 BLAKE2B 6eac029b7de6fb2c9b56a60655b6a224cdcba25fa86662a0423044ab97248984c4c6cfbaacbe4bbb2e3fc6826693791f232c6c55d7f15995d0e5bd00370a9ba8 SHA512 74a238573f9f911e9a39885b52d8c908d51d5620e346b8927c161111ce193566c315999f71d3edb1cb1326970985fd73d533b5483afe0c98ad76798a3c15e242
22 DIST fakeredis-1.6.0.gh.tar.gz 70034 BLAKE2B 3e9526bf8a7bdafe2b471f0a9d488f0d654e93666863513444521eefd0ca31dbba7e589431b5dee64b27dbf9c2bcc05c1517f659942aa4491cae42b1d11f45b9 SHA512 7a3aefc161b2396e748b284152e088fc31a49a859259888cf8dcfd3a72045e84079977b0e8f11b571ab00d6c00fcf82dc28a1a50fa75633cf17215553bbd019b
23 DIST fakeredis-1.6.1.gh.tar.gz 70171 BLAKE2B f10ac8aaec73871153ac7557a40984e6752b7e3720c1890380bda4aad828003403b6207c5e4f4ace18814e6ad33355acca08ff53cc33cb43acb5d9955ea6e5fc SHA512 1a8718d277d15a887901ed29691af83a2aea57605edf8cf2dbdc00c397a62ea8c1ed21440adadcda431a8ae8f33c85b549c5458a958b1fb74996e54ab612cd13
24 +DIST fakeredis-1.7.0.gh.tar.gz 71108 BLAKE2B 64b4c8aa2891ac6afd7789e5a8dce4d1a0ccd6a5083b410fd051d871d4ea9748e9d687eb27bbaeea646747f4bf170089d3ef711d6db0d6a88d8b7e755d165b6d SHA512 a8c67929e63196fea45b85097aaf6bf7402679510e471a8d13bdc0f7320e983107416d3e515fa85b1d6a6217fb82dbda7b4425c3c80ac54a1ac50eee875b0fbd
25
26 diff --git a/dev-python/fakeredis/fakeredis-1.7.0.ebuild b/dev-python/fakeredis/fakeredis-1.7.0.ebuild
27 new file mode 100644
28 index 000000000000..354eceb0ee87
29 --- /dev/null
30 +++ b/dev-python/fakeredis/fakeredis-1.7.0.ebuild
31 @@ -0,0 +1,80 @@
32 +# Copyright 2020-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=8
36 +
37 +PYTHON_COMPAT=( pypy3 python3_{8..10} )
38 +inherit distutils-r1 optfeature
39 +
40 +DESCRIPTION="Fake implementation of redis API for testing purposes"
41 +HOMEPAGE="
42 + https://github.com/jamesls/fakeredis/
43 + https://pypi.org/project/fakeredis/"
44 +SRC_URI="
45 + https://github.com/jamesls/fakeredis/archive/${PV}.tar.gz
46 + -> ${P}.gh.tar.gz"
47 +
48 +LICENSE="BSD"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
51 +
52 +RDEPEND="
53 + dev-python/redis-py[${PYTHON_USEDEP}]
54 + dev-python/six[${PYTHON_USEDEP}]
55 + dev-python/sortedcontainers[${PYTHON_USEDEP}]
56 +"
57 +BDEPEND="
58 + test? (
59 + dev-db/redis
60 + dev-python/aioredis[${PYTHON_USEDEP}]
61 + dev-python/hypothesis[${PYTHON_USEDEP}]
62 + dev-python/pytest-mock[${PYTHON_USEDEP}]
63 + )
64 +"
65 +
66 +distutils_enable_tests pytest
67 +
68 +EPYTEST_DESELECT=(
69 + test/test_aioredis2.py::test_blocking_unblock
70 + test/test_aioredis2.py::test_pubsub
71 + "test/test_aioredis2.py::test_repr[fake]"
72 + test/test_hypothesis.py::TestJoint::test
73 + test/test_hypothesis.py::TestFuzz::test
74 +)
75 +
76 +python_test() {
77 + local EPYTEST_DESELECT=(
78 + # also lupa
79 + "test/test_aioredis2.py::test_failed_script_error[fake]"
80 + )
81 + local args=(
82 + # tests requiring lupa (lua support)
83 + -k 'not test_eval and not test_lua and not test_script'
84 + )
85 + epytest "${args[@]}"
86 +}
87 +
88 +src_test() {
89 + local redis_pid="${T}"/redis.pid
90 + local redis_port=6379
91 + local redis_test_config="
92 + daemonize yes
93 + pidfile ${redis_pid}
94 + port ${redis_port}
95 + bind 127.0.0.1
96 + "
97 +
98 + einfo "Spawning Redis"
99 + einfo "NOTE: Port ${redis_port} must be free"
100 + "${EPREFIX}"/usr/sbin/redis-server - <<< "${redis_test_config}" || die
101 +
102 + # Run the tests
103 + distutils-r1_src_test
104 +
105 + # Clean up afterwards
106 + kill "$(<"${redis_pid}")" || die
107 +}
108 +
109 +pkg_postinst() {
110 + optfeature "Mock aioredis" dev-python/aioredis
111 +}