Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-filter/pyzor/
Date: Sat, 07 May 2022 07:17:15
Message-Id: 1651907819.18d7b78bddea3fecf60dc6a1b6ac7d0206140c07.sam@gentoo
1 commit: 18d7b78bddea3fecf60dc6a1b6ac7d0206140c07
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 7 06:43:06 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat May 7 07:16:59 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18d7b78b
7
8 mail-filter/pyzor: add 1.0.0_p20211223
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 mail-filter/pyzor/Manifest | 1 +
13 mail-filter/pyzor/pyzor-1.0.0_p20211223.ebuild | 59 ++++++++++++++++++++++++++
14 2 files changed, 60 insertions(+)
15
16 diff --git a/mail-filter/pyzor/Manifest b/mail-filter/pyzor/Manifest
17 index 23730c858e15..08de429f76e4 100644
18 --- a/mail-filter/pyzor/Manifest
19 +++ b/mail-filter/pyzor/Manifest
20 @@ -1 +1,2 @@
21 DIST pyzor-1.0.0_p20200523.tar.gz 138077 BLAKE2B 13ad30f06ce32a24a42dd5aaa21ad2a6700df1bac3dc54a86532748688b094ee0f56a8e28e34336298388c6e0b95868e95d040866c9afa561d867069496608fe SHA512 afe3b14794aea68b1a7d72840257976c7c9f755a6f6dcaaf6ebacab465c176fe2aa84f3fe176006cdbe26ef0b07ed949f75f6ef729f65c604fadf6ce8472da8f
22 +DIST pyzor-1.0.0_p20211223.tar.gz 138500 BLAKE2B 242a7b2df3451f659d820771454e685868792bd2275b6d69d4c4adfd6044c781abe2d72fe1500a6074851faf8e88e95d6578c546d4d95fda03e11609d1a0b436 SHA512 218bea40515a21b1e08b2bad5b7ba339ba84fff2da425dc58df72a967730ebe10e319944e1604ff56bb37f6a8ae7bc0cd974b54b18a4878ba103131b8ea47b67
23
24 diff --git a/mail-filter/pyzor/pyzor-1.0.0_p20211223.ebuild b/mail-filter/pyzor/pyzor-1.0.0_p20211223.ebuild
25 new file mode 100644
26 index 000000000000..b7766b0cbbe6
27 --- /dev/null
28 +++ b/mail-filter/pyzor/pyzor-1.0.0_p20211223.ebuild
29 @@ -0,0 +1,59 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +DISTUTILS_USE_PEP517=setuptools
36 +PYTHON_COMPAT=( python3_{8..10} )
37 +inherit distutils-r1
38 +
39 +MY_COMMIT="2dbe627c1ec245db206cdc73bf1f9d785f1512d8"
40 +DESCRIPTION="A distributed, collaborative spam detection and filtering network"
41 +HOMEPAGE="https://github.com/SpamExperts/pyzor"
42 +SRC_URI="https://github.com/SpamExperts/pyzor/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"
43 +S="${WORKDIR}/${PN}-${MY_COMMIT}"
44 +
45 +LICENSE="GPL-2"
46 +SLOT="0"
47 +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
48 +IUSE="doc gdbm gevent mysql pyzord redis test"
49 +RESTRICT="!test? ( test )"
50 +
51 +RDEPEND="
52 + pyzord? (
53 + gdbm? ( $(python_gen_impl_dep 'gdbm') )
54 + gevent? ( dev-python/gevent[${PYTHON_USEDEP}] )
55 + mysql? ( dev-python/mysqlclient[${PYTHON_USEDEP}] )
56 + redis? ( dev-python/redis-py[${PYTHON_USEDEP}] )
57 + )"
58 +DEPEND="
59 + test? (
60 + gdbm? ( $(python_gen_impl_dep 'gdbm') )
61 + redis? ( dev-python/redis-py[${PYTHON_USEDEP}] )
62 + )
63 +"
64 +
65 +# TODO: maybe upstream would support skipping tests for which the
66 +# dependencies are missing?
67 +REQUIRED_USE="
68 + pyzord? ( || ( gdbm redis ) )
69 + test? ( gdbm redis )
70 +"
71 +
72 +distutils_enable_sphinx docs
73 +
74 +python_test() {
75 + pytest -vv tests/unit || die "Tests fail with ${EPYTHON}"
76 +}
77 +
78 +src_install() {
79 + distutils-r1_src_install
80 +
81 + if use pyzord; then
82 + dodir /usr/sbin
83 + mv "${ED}"/usr/bin/pyzord* "${ED}/usr/sbin" \
84 + || die "failed to relocate pyzord"
85 + else
86 + rm "${ED}"/usr/bin/pyzord* || die "failed to remove pyzord"
87 + fi
88 +}