mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-21 22:47:14 -08:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user