1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python2_7 python3_6 )
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"
19 # Testsuite appears to require a running local instance of a pymongo server
21 RDEPEND=">=dev-python/flask-0.8[${PYTHON_USEDEP}]
22 >=dev-python/pymongo-2.4[${PYTHON_USEDEP}]"
24 dev-python/setuptools[${PYTHON_USEDEP}]
25 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
27 PATCHES=( "${FILESDIR}"/docbuild.patch )
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
33 distutils-r1_python_prepare_all
36 python_compile_all() {
37 use doc && emake -C docs html
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