dev-python/pytest: arm64 stable (bug #723996)
[gentoo.git] / dev-python / flower / flower-0.9.1-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python3_6 )
6
7 inherit distutils-r1 systemd user
8
9 DESCRIPTION="Real-time monitor and web admin for Celery distributed task queue"
10 HOMEPAGE="https://flower.readthedocs.org/ https://github.com/mher/flower/ https://pypi.org/project/flower/"
11 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
12
13 LICENSE="BSD"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE=""
17 RESTRICT="test"
18
19 RDEPEND=">=dev-python/celery-3.1.0[${PYTHON_USEDEP}]
20         >=www-servers/tornado-4.2.0[${PYTHON_USEDEP}]
21         >=dev-python/pytz-2015.7[${PYTHON_USEDEP}]
22         >=dev-python/Babel-2.2.0[${PYTHON_USEDEP}]
23         dev-python/setuptools[${PYTHON_USEDEP}]"
24
25 pkg_setup() {
26         enewgroup ${PN}
27         enewuser ${PN} -1 -1 /dev/null ${PN}
28 }
29
30 src_prepare() {
31         eapply_user
32         sed -e 's:tornado==4.2.0:tornado>=4.2.0:' \
33                 -i requirements/default.txt || die
34 }
35
36 src_install() {
37         distutils-r1_src_install
38         insinto /etc/flower
39         doins "${FILESDIR}/config.py"
40         newinitd "${FILESDIR}/${PN}.initd" "${PN}"
41         newconfd "${FILESDIR}/${PN}.confd" "${PN}"
42         systemd_dounit "${FILESDIR}/${PN}.service"
43         keepdir /var/log/${PN}
44         fowners ${PN}:${PN} /var/log/${PN}
45         insinto /etc/logrotate.d
46         newins "${FILESDIR}/${PN}.logrotated" "${PN}"
47 }
48
49 python_install() {
50         distutils-r1_python_install --install-scripts "${EPREFIX}/usr/libexec/flower"
51 }
52
53 python_test() {
54         esetup.py test || die
55 }