Lines 1-42
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=5 |
6 |
PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} ) |
7 |
|
8 |
inherit distutils-r1 |
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/archive/${MY_PV}.tar.gz -> ${P}.tar.gz" |
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 |
|
24 |
S=${WORKDIR}/${MY_P} |
25 |
|
26 |
PATCHES=( "${FILESDIR}"/${PN}-3.6.20.1-fix_tests.patch ) |
27 |
|
28 |
python_compile() { |
29 |
if ! python_is_python3; then |
30 |
local CFLAGS="${CFLAGS} -fno-strict-aliasing" |
31 |
export CFLAGS |
32 |
fi |
33 |
distutils-r1_python_compile --enable=load_extension |
34 |
} |
35 |
|
36 |
python_test() { |
37 |
"${PYTHON}" setup.py build_test_extension || die "Building of test loadable extension failed" |
38 |
"${PYTHON}" tests.py -v || die "Tests failed under ${EPYTHON}" |
39 |
} |
40 |
|
41 |
# Docs build is presently non-functional due to upstream issues |
42 |
# See https://github.com/rogerbinns/apsw/issues/198 |