summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Scardovi <marco@scardovi.com>2021-05-01 11:16:25 +0200
committerJoonas Niilola <juippis@gentoo.org>2021-06-02 15:59:05 +0300
commita5c8f6d574beb2fc4ffba07dc78291f3f675d577 (patch)
tree6a3de8398aed7aa9d72f440f0fa6824f26f7896c /www-apps
parentsci-calculators/bc-gh: remove old versions (diff)
downloadgentoo-a5c8f6d574beb2fc4ffba07dc78291f3f675d577.tar.gz
gentoo-a5c8f6d574beb2fc4ffba07dc78291f3f675d577.tar.bz2
gentoo-a5c8f6d574beb2fc4ffba07dc78291f3f675d577.zip
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>
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/radicale/radicale-3.0.6-r2.ebuild (renamed from www-apps/radicale/radicale-3.0.6-r1.ebuild)42
1 files changed, 27 insertions, 15 deletions
diff --git a/www-apps/radicale/radicale-3.0.6-r1.ebuild b/www-apps/radicale/radicale-3.0.6-r2.ebuild
index 3c2169639c60..bd2ad27a5581 100644
--- a/www-apps/radicale/radicale-3.0.6-r1.ebuild
+++ b/www-apps/radicale/radicale-3.0.6-r2.ebuild
@@ -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
}