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