ca90563a2e66e990f3127252611ee94e0db69a2e
[gentoo.git] / dev-python / characteristic / characteristic-14.3.0-r1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python2_7 python3_{5,6} pypy{,3} )
7
8 inherit distutils-r1
9
10 DESCRIPTION="Python attributes without the boilerplate"
11 HOMEPAGE="https://characteristic.readthedocs.org/ https://github.com/hynek/characteristic"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
13
14 LICENSE="MIT"
15 SLOT="0"
16 KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86"
17 IUSE="doc test"
18
19 RDEPEND=""
20 DEPEND="
21         dev-python/setuptools[${PYTHON_USEDEP}]
22         test? ( dev-python/pytest[${PYTHON_USEDEP}] )
23         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
24
25 RESTRICT="!test? ( test )"
26
27 python_prepare_all() {
28         # Prevent un-needed download during build
29         sed -e "/^    'sphinx.ext.intersphinx',/d" -i docs/conf.py || die
30         distutils-r1_python_prepare_all
31 }
32
33 python_compile_all() {
34         use doc && emake -C docs html
35 }
36
37 python_test() {
38         esetup.py test
39 }
40
41 python_install_all() {
42         use doc && local HTML_DOCS=( docs/_build/html/. )
43         distutils-r1_python_install_all
44 }