| 1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/dev-python/flask-pymongo/flask-pymongo-0.1.2.ebuild,v 1.2 2012/06/21 15:52:52 mr_bones_ Exp $ |
| 4 |
|
| 5 |
EAPI="3" |
| 6 |
PYTHON_DEPEND="2:2.5" |
| 7 |
SUPPORT_PYTHON_ABIS="1" |
| 8 |
RESTRICT_PYTHON_ABIS="2.4 3.*" |
| 9 |
DISTUTILS_SRC_TEST="nosetests" |
| 10 |
|
| 11 |
inherit distutils |
| 12 |
|
| 13 |
MY_PN="Flask-PyMongo" |
| 14 |
MY_P="${MY_PN}-${PV}" |
| 15 |
|
| 16 |
DESCRIPTION="PyMongo support for Flask" |
| 17 |
HOMEPAGE="http://pypi.python.org/pypi/Flask-PyMongo" |
| 18 |
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz" |
| 19 |
|
| 20 |
LICENSE="BSD" |
| 21 |
SLOT="0" |
| 22 |
KEYWORDS="~amd64 ~x86" |
| 23 |
IUSE="doc examples" |
| 24 |
|
| 25 |
RDEPEND=">=dev-python/flask-0.8 |
| 26 |
>=dev-python/pymongo-2.1" |
| 27 |
DEPEND="${RDEPEND} |
| 28 |
doc? ( dev-python/sphinx ) |
| 29 |
dev-python/setuptools |
| 30 |
dev-python/nose" |
| 31 |
|
| 32 |
S="${WORKDIR}/${MY_P}" |
| 33 |
|
| 34 |
src_compile() { |
| 35 |
distutils_src_compile |
| 36 |
|
| 37 |
if use doc; then |
| 38 |
einfo "Generation of documentation" |
| 39 |
cd docs |
| 40 |
PYTHONPATH=".." emake html || die "Generation of documentation failed" |
| 41 |
fi |
| 42 |
} |
| 43 |
|
| 44 |
src_install() { |
| 45 |
distutils_src_install |
| 46 |
|
| 47 |
if use doc; then |
| 48 |
dohtml -r docs/_build/html/* || die "Installation of documentation failed" |
| 49 |
fi |
| 50 |
|
| 51 |
if use examples; then |
| 52 |
insinto /usr/share/doc/${PF} |
| 53 |
doins -r examples || die "Installation of examples failed" |
| 54 |
fi |
| 55 |
} |