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