blob: 441529566a040b7d5e77e84a4b476ce80e1a054b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{13..14} )
inherit distutils-r1
TAG=release-${PV//./-}
MY_P=${PN}-${TAG}
DESCRIPTION="A distributed, collaborative spam detection and filtering network"
HOMEPAGE="
https://github.com/SpamExperts/pyzor/
https://pypi.org/project/pyzor/
"
SRC_URI="
https://github.com/SpamExperts/pyzor/archive/${TAG}.tar.gz
-> ${MY_P}.gh.tar.gz
"
S=${WORKDIR}/${MY_P}
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 ppc64 ~sparc x86"
IUSE="doc gdbm mysql pyzord redis selinux test"
RESTRICT="!test? ( test )"
RDEPEND="
pyzord? (
gdbm? ( $(python_gen_impl_dep 'gdbm') )
mysql? ( dev-python/mysqlclient[${PYTHON_USEDEP}] )
redis? ( dev-python/redis[${PYTHON_USEDEP}] )
)
selinux? ( sec-policy/selinux-pyzor )
"
BDEPEND="
test? (
$(python_gen_impl_dep 'gdbm')
dev-python/redis[${PYTHON_USEDEP}]
)
"
REQUIRED_USE="
pyzord? ( || ( gdbm redis ) )
"
distutils_enable_sphinx docs
EPYTEST_PLUGINS=()
distutils_enable_tests pytest
python_test() {
epytest -vv tests/unit
}
src_install() {
distutils-r1_src_install
if use pyzord; then
dodir /usr/sbin
mv "${ED}"/usr/bin/pyzord* "${ED}/usr/sbin" \
|| die "failed to relocate pyzord"
else
rm "${ED}"/usr/bin/pyzord* || die "failed to remove pyzord"
fi
}
|