Gentoo Archives: gentoo-commits

From: Arthur Zamarin <arthurzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/rq/
Date: Mon, 10 Jan 2022 20:39:50
Message-Id: 1641847145.19dfd10dbb36fdf8d766ba2c5750bd754e752983.arthurzam@gentoo
1 commit: 19dfd10dbb36fdf8d766ba2c5750bd754e752983
2 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 10 20:39:05 2022 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 10 20:39:05 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19dfd10d
7
8 dev-python/rq: enable py3.10
9
10 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
11
12 dev-python/rq/rq-1.10.1-r1.ebuild | 53 +++++++++++++++++++++++++++++++++++++++
13 1 file changed, 53 insertions(+)
14
15 diff --git a/dev-python/rq/rq-1.10.1-r1.ebuild b/dev-python/rq/rq-1.10.1-r1.ebuild
16 new file mode 100644
17 index 000000000000..ec467b29af9a
18 --- /dev/null
19 +++ b/dev-python/rq/rq-1.10.1-r1.ebuild
20 @@ -0,0 +1,53 @@
21 +# Copyright 1999-2022 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=8
25 +
26 +PYTHON_COMPAT=( python3_{8..10} )
27 +inherit distutils-r1
28 +
29 +DESCRIPTION="simple, lightweight library for creating and processing background jobs"
30 +HOMEPAGE="https://python-rq.org https://github.com/rq/rq"
31 +SRC_URI="https://github.com/rq/rq/archive/v${PV}.tar.gz -> ${P}.tar.gz"
32 +
33 +LICENSE="BSD"
34 +SLOT="0"
35 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
36 +
37 +RDEPEND="
38 + >=dev-python/click-5.0[${PYTHON_USEDEP}]
39 + >=dev-python/redis-py-3.5.0[${PYTHON_USEDEP}]
40 +"
41 +BDEPEND="
42 + test? (
43 + dev-db/redis
44 + dev-python/mock[${PYTHON_USEDEP}]
45 + dev-python/psutil[${PYTHON_USEDEP}]
46 + dev-python/sentry-sdk[${PYTHON_USEDEP}]
47 + )
48 +"
49 +
50 +distutils_enable_tests --install pytest
51 +
52 +src_test() {
53 + local redis_pid="${T}"/redis.pid
54 + local redis_port=6379
55 + local redis_test_config="daemonize yes
56 + pidfile ${redis_pid}
57 + port ${redis_port}
58 + bind 127.0.0.1
59 + "
60 +
61 + # Spawn Redis itself for testing purposes
62 + # NOTE: On sam@'s machine, spawning Redis can hang in the sandbox.
63 + # I'm not restricting tests yet because this doesn't happen for anyone else AFAICT.
64 + einfo "Spawning Redis"
65 + einfo "NOTE: Port ${redis_port} must be free"
66 + /usr/sbin/redis-server - <<< "${redis_test_config}" || die
67 +
68 + # Run the actual tests
69 + distutils-r1_src_test
70 +
71 + # Clean up afterwards
72 + kill "$(<"${redis_pid}")" || die
73 +}