summaryrefslogtreecommitdiff
path: root/dev-python/pymilter/pymilter-9999.ebuild
blob: c95fbf034c46a7668d262b36af69e95356af5ae1 (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
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{12..14} )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1

if [[ ${PV} == *9999 ]] ; then
	EGIT_REPO_URI="https://github.com/sdgathman/pymilter.git"
	inherit git-r3
else
	KEYWORDS="~amd64 ~arm64"
	if [[ ${PV} == *_pre* ]]; then
		SRC_URI="https://dev.gentoo.org/~eras/distfiles/${P}.tar.xz"
		S="${WORKDIR}/pymilter"
	else
		inherit pypi
	fi
fi

DESCRIPTION="module to enable python scripts to attach to Sendmail's libmilter API"
HOMEPAGE="https://www.pymilter.org/"

LICENSE="GPL-2"
SLOT="0"

RDEPEND="
	mail-filter/libmilter:=
"

distutils_enable_tests unittest

src_test() {
	# requires berkeleydb and bsddb3 modules
	sed -i -e "/s.addTest(testpolicy.suite())/d" \
		-e "/import testpolicy/d" test.py || die
	rm testpolicy.py
	distutils-r1_src_test
}