1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( pypy3 python3_{6,7} )
7 # xml.etree.ElementTree module required.
8 PYTHON_REQ_USE="xml(+)"
10 inherit distutils-r1 systemd user
14 DESCRIPTION="A system for controlling process state under UNIX"
15 HOMEPAGE="http://supervisord.org/ https://pypi.org/project/supervisor/"
16 SRC_URI="mirror://pypi/${P:0:1}/${PN}/${PN}-${MY_PV}.tar.gz"
18 LICENSE="repoze ZPL BSD HPND GPL-2"
22 RESTRICT="!test? ( test )"
25 >=dev-python/meld3-1.0.0[${PYTHON_USEDEP}]
26 dev-python/setuptools[${PYTHON_USEDEP}]
29 dev-python/setuptools[${PYTHON_USEDEP}]
30 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
33 dev-python/mock[${PYTHON_USEDEP}]
34 dev-python/pytest[${PYTHON_USEDEP}]
38 S="${WORKDIR}/${PN}-${MY_PV}"
40 python_compile_all() {
43 HTML_DOCS=( docs/.build/html/. )
48 pytest -vv || die "tests failed with ${EPYTHON}"
51 python_install_all() {
52 distutils-r1_python_install_all
53 newinitd "${FILESDIR}/init.d-r2" supervisord
54 newconfd "${FILESDIR}/conf.d-r1" supervisord
55 dodoc supervisor/skel/sample.conf
56 keepdir /etc/supervisord.d
58 doins "${FILESDIR}/supervisord.conf"
59 keepdir /var/log/supervisor
60 systemd_dounit "${FILESDIR}/supervisord.service"
65 fowners :supervisor /var/log/supervisor
66 fperms 750 /var/log/supervisor
70 if [[ -z "${REPLACING_VERSIONS}" ]]; then
71 # This is a new installation
72 elog "You may install your configuration files in ${EROOT}/etc/supervisord.d"
73 elog "For config examples, see ${EROOT}/usr/share/doc/${PF}/sample.conf.bz2"
75 elog "By default, only members of the supervisor group can run supervisorctl."