dev-python/pcapy: version bump.
[gentoo.git] / dev-python / flask-sqlalchemy / flask-sqlalchemy-2.3.2.ebuild
1 # Copyright 1999-2019 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_5,3_6} pypy )
6
7 inherit distutils-r1
8
9 MY_PN="Flask-SQLAlchemy"
10 MY_P="${MY_PN}-${PV}"
11
12 DESCRIPTION="SQLAlchemy support for Flask applications"
13 HOMEPAGE="https://pypi.org/project/Flask-SQLAlchemy/"
14 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
15
16 LICENSE="BSD"
17 SLOT="0"
18 KEYWORDS="amd64 x86"
19 IUSE="doc test"
20
21 RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
22         >=dev-python/flask-0.10[${PYTHON_USEDEP}]
23         dev-python/sqlalchemy[${PYTHON_USEDEP}]"
24 DEPEND="${RDEPEND}
25         test? ( dev-python/pytest[${PYTHON_USEDEP}] )
26         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
27
28 # Patch out un-needed d'loading of obj.inv files in doc build
29 PATCHES=( "${FILESDIR}"/2.3.2-mapping.patch )
30
31 # Req'd for tests in py3
32 DISTUTILS_IN_SOURCE_BUILD=1
33
34 S="${WORKDIR}/${MY_P}"
35
36 python_compile_all() {
37         use doc && esetup.py build_sphinx
38 }
39
40 python_test() {
41         pytest
42 }
43
44 python_install_all() {
45         use doc && HTML_DOCS=( "${BUILD_DIR}"/sphinx/html/. )
46         distutils-r1_python_install_all
47 }