920a848ee2aac52e378dbd455dfa16c907ce0237
[gentoo.git] / dev-python / flask-pymongo / flask-pymongo-0.4.1.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=( python2_7 python3_6 )
6
7 inherit distutils-r1
8
9 DESCRIPTION="PyMongo support for Flask"
10 HOMEPAGE="https://pypi.org/project/Flask-PyMongo/"
11 SRC_URI="https://github.com/dcrosta/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
12
13 LICENSE="BSD"
14 SLOT="0"
15 KEYWORDS="amd64 x86"
16 IUSE="doc examples"
17
18 RESTRICT="test"
19 # Testsuite appears to require a running local instance of a pymongo server
20
21 RDEPEND=">=dev-python/flask-0.8[${PYTHON_USEDEP}]
22         >=dev-python/pymongo-2.4[${PYTHON_USEDEP}]"
23 DEPEND="${RDEPEND}
24         dev-python/setuptools[${PYTHON_USEDEP}]
25         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
26
27 PATCHES=( "${FILESDIR}"/docbuild.patch )
28
29 python_prepare_all() {
30         # Req'd to avoid file collisions
31         sed -e s":find_packages():find_packages(exclude=['tests']):" -i setup.py || die
32
33         distutils-r1_python_prepare_all
34 }
35
36 python_compile_all() {
37         use doc && emake -C docs html
38 }
39
40 python_install_all() {
41         use doc && local HTML_DOCS=( docs/_build/html/. )
42         use examples && dodoc -r examples
43         distutils-r1_python_install_all
44 }