64595f9d08bd880159f959212927355fad462a2b
[gentoo.git] / dev-python / doublex / doublex-1.8.1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 PYTHON_COMPAT=( python{2_7,3_5,3_6} )
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 RESTRICT="!test? ( 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 }