Line 0
Link Here
|
|
|
1 |
# Copyright 1999-2015 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Id$ |
4 |
|
5 |
EAPI=6 |
6 |
PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} ) |
7 |
|
8 |
inherit distutils-r1 flag-o-matic |
9 |
|
10 |
MY_PV=${PV/_p/-r} |
11 |
MY_P=${PN}-${MY_PV} |
12 |
|
13 |
DESCRIPTION="APSW - Another Python SQLite Wrapper" |
14 |
HOMEPAGE="https://github.com/rogerbinns/apsw/" |
15 |
SRC_URI="https://github.com/rogerbinns/apsw/releases/download/${MY_PV}/${MY_P}.zip -> ${P}.zip" |
16 |
|
17 |
LICENSE="ZLIB" |
18 |
SLOT="0" |
19 |
KEYWORDS="~amd64 ~arm ~ppc64 ~x86" |
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 |
if ! python_is_python3; then |
31 |
append-cflags -fno-strict-aliasing |
32 |
fi |
33 |
distutils-r1_python_compile --enable=load_extension |
34 |
} |
35 |
|
36 |
python_install_all() { |
37 |
use doc && local HTML_DOCS=( doc/. ) |
38 |
distutils-r1_python_install_all |
39 |
} |
40 |
|
41 |
python_test() { |
42 |
"${PYTHON}" setup.py build_test_extension || die "Building of test loadable extension failed" |
43 |
"${PYTHON}" tests.py -v || die "Tests failed under ${EPYTHON}" |
44 |
} |