www-apps/radicale: enabling test

Added required packages for enabling test on pytest

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Marco Scardovi <marco@scardovi.com>
Closes: https://github.com/gentoo/gentoo/pull/20625
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
This commit is contained in:
Marco Scardovi
2021-06-02 15:59:05 +03:00
committed by Joonas Niilola
parent 8feca869bc
commit a5c8f6d574
@@ -4,7 +4,7 @@
EAPI=7
DISTUTILS_USE_SETUPTOOLS=rdepend
PYTHON_COMPAT=( python3_{7..9} )
PYTHON_COMPAT=( python3_{8..9} )
inherit distutils-r1 systemd
@@ -23,38 +23,49 @@ RDEPEND="
acct-group/radicale
dev-python/defusedxml
dev-python/passlib[bcrypt,${PYTHON_USEDEP}]
>=dev-python/vobject-0.9.6[${PYTHON_USEDEP}]
>=dev-python/python-dateutil-2.8.1[${PYTHON_USEDEP}]
dev-python/python-dateutil[${PYTHON_USEDEP}]
dev-python/vobject[${PYTHON_USEDEP}]
dev-python/waitress[${PYTHON_USEDEP}]
sys-apps/util-linux
"
BDEPEND="test? ( ${RDEPEND} )"
S="${WORKDIR}/${MY_P}"
RDIR=/var/lib/${PN}
RDIR=/var/lib/"${PN}"
DOCS=( DOCUMENTATION.md NEWS.md )
src_prepare() {
sed -i '/^addopts =/d' setup.cfg || die
distutils-r1_src_prepare
}
python_install_all() {
rm README* || die
# init file
newinitd "${FILESDIR}"/radicale-r3.init.d radicale
systemd_dounit "${FILESDIR}/${PN}.service"
# directories
keepdir ${RDIR}
fowners ${PN}:${PN} ${RDIR}
fperms 0750 ${RDIR}
keepdir "${RDIR}"
fperms 0750 "${RDIR}"
fowners "${PN}:${PN}" "${RDIR}"
# config file
insinto /etc/${PN}
insinto /etc/"${PN}"
doins config
# fcgi and wsgi files
exeinto /usr/share/${PN}
exeinto /usr/share/"${PN}"
doexe radicale.wsgi
distutils-r1_python_install_all
}
distutils_enable_tests pytest
pkg_postinst() {
local _erdir="${EROOT}${RDIR}"
@@ -62,11 +73,12 @@ pkg_postinst() {
einfo "You will also find there an example FastCGI script."
if [[ $(stat --format="%U:%G:%a" "${_erdir}") != "${PN}:${PN}:750" ]]
then
ewarn "Unsafe file permissions detected on ${_erdir}. This probably comes"
ewarn "from an earlier version of this ebuild."
ewarn ""
ewarn "Unsafe file permissions detected on ${_erdir}."
ewarn "This probably comes from an earlier version of this ebuild."
ewarn "To fix run:"
ewarn " \`chown -R ${PN}:${PN} ${_erdir}\`"
ewarn " \`chmod 0750 ${_erdir}\`"
ewarn " \`chmod -R o= ${_erdir}\`"
ewarn "# \`chown -R ${PN}:${PN} ${_erdir}\`"
ewarn "# \`chmod 0750 ${_erdir}\`"
ewarn "# \`chmod -R o= ${_erdir}\`"
fi
}