*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / pypam / pypam-0.5.0-r3.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 PYTHON_COMPAT=( python{2_7,3_6} )
6
7 inherit distutils-r1 flag-o-matic
8
9 MY_PN="PyPAM"
10 MY_P="${MY_PN}-${PV}"
11
12 DESCRIPTION="Python Bindings for PAM (Pluggable Authentication Modules)"
13 HOMEPAGE="http://www.pangalactic.org/PyPAM"
14 SRC_URI="http://www.pangalactic.org/PyPAM/${MY_P}.tar.gz"
15
16 LICENSE="LGPL-2.1"
17 SLOT="0"
18 KEYWORDS="amd64 ~arm ~arm64 x86"
19 IUSE=""
20
21 DEPEND=">=sys-libs/pam-0.64"
22 RDEPEND="${DEPEND}"
23
24 S="${WORKDIR}/${MY_P}"
25
26 DOCS=( AUTHORS examples/pamtest.py )
27
28 PATCHES=(
29         # Pull patches from fedora.
30         "${FILESDIR}/PyPAM-${PV}-dealloc.patch"
31         "${FILESDIR}/PyPAM-${PV}-nofree.patch"
32         "${FILESDIR}/PyPAM-${PV}-memory-errors.patch"
33         "${FILESDIR}/PyPAM-${PV}-return-value.patch"
34         "${FILESDIR}/PyPAM-python3-support.patch"
35         # Fix a missing include.
36         "${FILESDIR}/${P}-stricter.patch"
37 )
38
39 src_compile() {
40         append-cflags -fno-strict-aliasing
41         distutils-r1_src_compile
42 }
43
44 python_test() {
45         "${PYTHON}" tests/PamTest.py
46 }