*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / apsw / apsw-3.23.1_p1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python{2_7,3_6} )
6
7 inherit distutils-r1 flag-o-matic
8
9 MY_PV=${PV/_p/-r}
10 MY_P=${PN}-${MY_PV}
11
12 DESCRIPTION="APSW - Another Python SQLite Wrapper"
13 HOMEPAGE="https://github.com/rogerbinns/apsw/"
14 SRC_URI="https://github.com/rogerbinns/apsw/releases/download/${MY_PV}/${MY_P}.zip -> ${P}.zip"
15
16 LICENSE="ZLIB"
17 SLOT="0"
18 KEYWORDS="amd64 ~arm ~ppc64 x86"
19 IUSE="doc"
20
21 RDEPEND=">=dev-db/sqlite-${PV%_p*}"
22 DEPEND="${RDEPEND}
23         app-arch/unzip"
24
25 S=${WORKDIR}/${MY_P}
26
27 PATCHES=( "${FILESDIR}/${PN}-3.6.20.1-fix_tests.patch" )
28
29 python_compile() {
30         python_is_python3 || append-cflags -fno-strict-aliasing
31         distutils-r1_python_compile --enable=load_extension
32 }
33
34 python_test() {
35         "${PYTHON}" setup.py build_test_extension || die "Building of test loadable extension failed"
36         "${PYTHON}" tests.py -v || die "Tests failed under ${EPYTHON}"
37 }
38
39 python_install_all() {
40         use doc && local HTML_DOCS=( doc/. )
41         distutils-r1_python_install_all
42 }