diff options
author | Tomáš Mózes <hydrapolic@gmail.com> | 2020-05-23 18:40:30 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2020-09-02 05:00:28 +0000 |
commit | cd9172fb91c1f3649997a06f2f063223a3e5fa4e (patch) | |
tree | d6e9e7640f658ea17278c25a1f13fc1f0bec31af /mail-filter | |
parent | app-i18n/pyzy: add python3 support (diff) | |
download | gentoo-cd9172fb91c1f3649997a06f2f063223a3e5fa4e.tar.gz gentoo-cd9172fb91c1f3649997a06f2f063223a3e5fa4e.tar.bz2 gentoo-cd9172fb91c1f3649997a06f2f063223a3e5fa4e.zip |
mail-filter/pyzor: add snapshot with python 3.{7,8} support
Bug: https://bugs.gentoo.org/718326
Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'mail-filter')
-rw-r--r-- | mail-filter/pyzor/Manifest | 1 | ||||
-rw-r--r-- | mail-filter/pyzor/metadata.xml | 4 | ||||
-rw-r--r-- | mail-filter/pyzor/pyzor-1.0.1_pre20200523.ebuild | 61 |
3 files changed, 66 insertions, 0 deletions
diff --git a/mail-filter/pyzor/Manifest b/mail-filter/pyzor/Manifest index 4cfe0abd497e..fc35455a69a5 100644 --- a/mail-filter/pyzor/Manifest +++ b/mail-filter/pyzor/Manifest @@ -1 +1,2 @@ DIST pyzor-1.0.0.tar.gz 126276 BLAKE2B c60f26c53bf118c88dacbc49ddd414473748af1868b383a9c937ecf3cfe426ecdd60f64388fe7e555bd4641ef445769600e40879279dd544ef9ea32bd0dab6b9 SHA512 b3fb8b2c5261e187a2ab3a5a3b12d221df7de08766c6bb2ad9990c0f23517534871ecc9d5ad529e79b0d0aef8b2b800728320c57435a8c0d8c3f80a4ba0f7e4a +DIST pyzor-f46159bd6519cebcebf59e9334a7920371111d75.tar.gz 138077 BLAKE2B 13ad30f06ce32a24a42dd5aaa21ad2a6700df1bac3dc54a86532748688b094ee0f56a8e28e34336298388c6e0b95868e95d040866c9afa561d867069496608fe SHA512 afe3b14794aea68b1a7d72840257976c7c9f755a6f6dcaaf6ebacab465c176fe2aa84f3fe176006cdbe26ef0b07ed949f75f6ef729f65c604fadf6ce8472da8f diff --git a/mail-filter/pyzor/metadata.xml b/mail-filter/pyzor/metadata.xml index 21a8605f2713..c8b645011f06 100644 --- a/mail-filter/pyzor/metadata.xml +++ b/mail-filter/pyzor/metadata.xml @@ -10,6 +10,10 @@ <flag name="gdbm"> Enables the Gdbm back-end database engine for pyzord </flag> + <flag name="mysql"> + Enables the MySQL back-end database engine for pyzord through + <pkg>dev-python/mysqlclient</pkg>. + </flag> <flag name="redis"> Enables the redis back-end database engine for pyzord through <pkg>dev-python/redis-py</pkg> diff --git a/mail-filter/pyzor/pyzor-1.0.1_pre20200523.ebuild b/mail-filter/pyzor/pyzor-1.0.1_pre20200523.ebuild new file mode 100644 index 000000000000..690769b4a583 --- /dev/null +++ b/mail-filter/pyzor/pyzor-1.0.1_pre20200523.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7,8} ) +inherit distutils-r1 + +COMMIT="f46159bd6519cebcebf59e9334a7920371111d75" + +DESCRIPTION="A distributed, collaborative spam detection and filtering network" +HOMEPAGE="https://github.com/SpamExperts/pyzor" +SRC_URI="https://github.com/SpamExperts/pyzor/archive/${COMMIT}.tar.gz -> ${PN}-${COMMIT}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-linux" + +IUSE="doc gdbm gevent mysql pyzord redis test" +RESTRICT="!test? ( test )" + +RDEPEND=" + pyzord? ( + gdbm? ( $(python_gen_impl_dep 'gdbm') ) + gevent? ( dev-python/gevent[${PYTHON_USEDEP}] ) + mysql? ( dev-python/mysqlclient[${PYTHON_USEDEP}] ) + redis? ( dev-python/redis-py[${PYTHON_USEDEP}] ) + )" +DEPEND=" + test? ( + gdbm? ( $(python_gen_impl_dep 'gdbm') ) + redis? ( dev-python/redis-py[${PYTHON_USEDEP}] ) + ) +" +BDEPEND="test? ( dev-python/pytest[${PYTHON_USEDEP}] )" + +# TODO: maybe upstream would support skipping tests for which the +# dependencies are missing? +REQUIRED_USE=" + pyzord? ( || ( gdbm redis ) ) + test? ( gdbm redis ) +" +S="${WORKDIR}/${PN}-${COMMIT}" + +distutils_enable_sphinx "docs" + +python_test() { + pytest -vv tests/unit || die "Tests fail with ${EPYTHON}" +} + +src_install() { + distutils-r1_src_install + + if use pyzord; then + dodir /usr/sbin + mv "${D}"/usr/bin/pyzord* "${ED}/usr/sbin" \ + || die "failed to relocate pyzord" + else + rm "${D}"/usr/bin/pyzord* || die "failed to remove pyzord" + fi +} |