1 |
commit: 7373e6825424d983aafe0dbe1699e94d3da72210 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 16 03:09:13 2023 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 16 03:09:13 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7373e682 |
7 |
|
8 |
dev-python/fakeredis: Bump to 2.10.1 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/fakeredis/Manifest | 1 + |
13 |
dev-python/fakeredis/fakeredis-2.10.1.ebuild | 84 ++++++++++++++++++++++++++++ |
14 |
2 files changed, 85 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/fakeredis/Manifest b/dev-python/fakeredis/Manifest |
17 |
index 94cce147fa3d..83f2961e7935 100644 |
18 |
--- a/dev-python/fakeredis/Manifest |
19 |
+++ b/dev-python/fakeredis/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST fakeredis-py-2.10.0.gh.tar.gz 160050 BLAKE2B 9c97abe80ca683cd068e3e8616b068c166f08f1b1eb360b76c57da4b9d68396a5dd6fb4152e92dcd73a1407c50e259db54ba5edd61bc2dca774672de84fcf2d3 SHA512 31df18ead5e2937a7a98297f4dc08790371968dd1fa6d9dfa54eb35ab27c2a4a88e2186c252c8a630e0e70fa04e67eccb68e687f9383b6770313cf8b79f6b3bc |
22 |
+DIST fakeredis-py-2.10.1.gh.tar.gz 159626 BLAKE2B 41d28b57c369273d96a985d6b47c8b162d1fc94c508daae12048e139c9d7bb9c44b39c95eb77cfb06d24cd1b44ccaa65f3d32f4976bfdda72e319d5da1cd69c4 SHA512 5659f5e3a6344448916bfe9ad88fff45b266488aa6d4e0b503f8594308ecfb8e97b1f588b658cb01a5dbe5fc06e64a1bbb6eafaa28aed0b8761b5e15638615ea |
23 |
DIST fakeredis-py-2.9.2.gh.tar.gz 165549 BLAKE2B 351e07976ed6a4d11429c83aefe3a0e2d4397a97fdb2904ab65ac4d2717d129f5ac018f071b8670012aabe127d87350f3285f6f86369bb4b7eadbd61da5774f7 SHA512 6e9ab0851f74ade2325aad88b86212b4052ca53a7510034cd888ef4080eec4129b226ab8c166ab09fa6e3d3b2c3c70fce8adafdb4081a4d3501fd4d9d5e04b84 |
24 |
|
25 |
diff --git a/dev-python/fakeredis/fakeredis-2.10.1.ebuild b/dev-python/fakeredis/fakeredis-2.10.1.ebuild |
26 |
new file mode 100644 |
27 |
index 000000000000..c382b83985f0 |
28 |
--- /dev/null |
29 |
+++ b/dev-python/fakeredis/fakeredis-2.10.1.ebuild |
30 |
@@ -0,0 +1,84 @@ |
31 |
+# Copyright 2020-2023 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=8 |
35 |
+ |
36 |
+DISTUTILS_USE_PEP517=poetry |
37 |
+PYTHON_COMPAT=( pypy3 python3_{9..11} ) |
38 |
+ |
39 |
+inherit distutils-r1 |
40 |
+ |
41 |
+MY_P=fakeredis-py-${PV} |
42 |
+DESCRIPTION="Fake implementation of redis API for testing purposes" |
43 |
+HOMEPAGE=" |
44 |
+ https://github.com/cunla/fakeredis-py/ |
45 |
+ https://pypi.org/project/fakeredis/ |
46 |
+" |
47 |
+SRC_URI=" |
48 |
+ https://github.com/cunla/fakeredis-py/archive/v${PV}.tar.gz |
49 |
+ -> ${MY_P}.gh.tar.gz |
50 |
+" |
51 |
+S=${WORKDIR}/${MY_P} |
52 |
+ |
53 |
+LICENSE="BSD" |
54 |
+SLOT="0" |
55 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86" |
56 |
+ |
57 |
+RDEPEND=" |
58 |
+ <dev-python/redis-5[${PYTHON_USEDEP}] |
59 |
+ >=dev-python/redis-4.2[${PYTHON_USEDEP}] |
60 |
+ <dev-python/sortedcontainers-3[${PYTHON_USEDEP}] |
61 |
+ >=dev-python/sortedcontainers-2.4.0[${PYTHON_USEDEP}] |
62 |
+" |
63 |
+BDEPEND=" |
64 |
+ test? ( |
65 |
+ dev-db/redis |
66 |
+ dev-python/pytest-asyncio[${PYTHON_USEDEP}] |
67 |
+ dev-python/pytest-mock[${PYTHON_USEDEP}] |
68 |
+ ) |
69 |
+" |
70 |
+ |
71 |
+distutils_enable_tests pytest |
72 |
+ |
73 |
+python_test() { |
74 |
+ local EPYTEST_DESELECT=( |
75 |
+ # also lupa |
76 |
+ test/test_aioredis2.py::test_failed_script_error |
77 |
+ # TODO |
78 |
+ "test/test_fakeredis.py::test_set_get_nx[StrictRedis]" |
79 |
+ "test/test_fakeredis.py::test_lpop_count[StrictRedis]" |
80 |
+ "test/test_fakeredis.py::test_rpop_count[StrictRedis]" |
81 |
+ "test/test_fakeredis.py::test_zadd_minus_zero[StrictRedis]" |
82 |
+ "test/test_mixins/test_pubsub_commands.py::test_pubsub_channels[StrictRedis]" |
83 |
+ test/test_mixins/test_set_commands.py::test_smismember_wrong_type |
84 |
+ ) |
85 |
+ local EPYTEST_IGNORE=( |
86 |
+ # these tests fail a lot... |
87 |
+ test/test_hypothesis.py |
88 |
+ ) |
89 |
+ local args=( |
90 |
+ # tests requiring lupa (lua support) |
91 |
+ -k 'not test_eval and not test_lua and not test_script' |
92 |
+ ) |
93 |
+ epytest "${args[@]}" |
94 |
+} |
95 |
+ |
96 |
+src_test() { |
97 |
+ local redis_pid="${T}"/redis.pid |
98 |
+ local redis_port=6379 |
99 |
+ |
100 |
+ einfo "Spawning Redis" |
101 |
+ einfo "NOTE: Port ${redis_port} must be free" |
102 |
+ "${EPREFIX}"/usr/sbin/redis-server - <<- EOF || die "Unable to start redis server" |
103 |
+ daemonize yes |
104 |
+ pidfile ${redis_pid} |
105 |
+ port ${redis_port} |
106 |
+ bind 127.0.0.1 |
107 |
+ EOF |
108 |
+ |
109 |
+ # Run the tests |
110 |
+ distutils-r1_src_test |
111 |
+ |
112 |
+ # Clean up afterwards |
113 |
+ kill "$(<"${redis_pid}")" || die |
114 |
+} |