proj/gentoo: Initial commit
[gentoo.git] / dev-python / doublex / doublex-1.8.1.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 PYTHON_COMPAT=( python2_7 python3_3 python3_4 )
7
8 inherit distutils-r1 vcs-snapshot
9
10 DESCRIPTION="Python test doubles"
11 HOMEPAGE="https://bitbucket.org/DavidVilla/python-doublex"
12 SRC_URI="https://bitbucket.org/DavidVilla/python-${PN}/get/v${PV}.tar.gz -> ${P}.tar.gz"
13
14 LICENSE="GPL-3"
15 SLOT="0"
16 KEYWORDS="~amd64"
17 IUSE="doc test"
18
19 CDEPEND="dev-python/pyhamcrest[${PYTHON_USEDEP}]"
20 DEPEND="
21         ${CDEPEND}
22         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
23         test? (
24                 dev-python/nose[${PYTHON_USEDEP}]
25                 $(python_gen_cond_dep 'dev-python/unittest2[${PYTHON_USEDEP}]' 'python2*')
26         )
27 "
28 RDEPEND="${CDEPEND}"
29
30 python_compile_all() {
31         use doc && emake -C docs
32 }
33
34 python_test() {
35         esetup.py test || die "Tests failed under ${EPYTHON}"
36 }
37
38 python_install_all() {
39         use doc && local HTML_DOCS=( docs/_build/html/. )
40
41         distutils-r1_python_install_all
42
43         rm "${D}"/usr/README.rst || die "Couldn't remove spurious README.rst"
44 }