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/rq/
Date: Sun, 08 May 2022 08:47:37
Message-Id: 1651999634.05baff1a57bb631c5242eed31e270a66a64d28a2.mgorny@gentoo
1 commit: 05baff1a57bb631c5242eed31e270a66a64d28a2
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 8 08:35:34 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun May 8 08:47:14 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05baff1a
7
8 dev-python/rq: Remove py3.8 due to sentry-sdk losing it
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/rq/rq-1.10.1-r2.ebuild | 53 +++++++++++++++++++++++++++++++++++++++
13 1 file changed, 53 insertions(+)
14
15 diff --git a/dev-python/rq/rq-1.10.1-r2.ebuild b/dev-python/rq/rq-1.10.1-r2.ebuild
16 new file mode 100644
17 index 000000000000..881f7c8bbe31
18 --- /dev/null
19 +++ b/dev-python/rq/rq-1.10.1-r2.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_{9..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 ~riscv ~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 +}