dev-perl/Class-Inspector: amd64 stable
[gentoo.git] / dev-python / nbformat / nbformat-4.3.0.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
7 PYTHON_REQ_USE='sqlite'
8
9 inherit distutils-r1
10
11 DESCRIPTION="Reference implementation of the Jupyter Notebook format"
12 HOMEPAGE="http://jupyter.org"
13 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
14
15 LICENSE="BSD"
16 SLOT="0"
17 KEYWORDS="~amd64 ~arm64 ~x86"
18 IUSE="doc test"
19
20 RDEPEND="
21         >=dev-python/jsonschema-2.4.0[${PYTHON_USEDEP}]
22         dev-python/ipython_genutils[${PYTHON_USEDEP}]
23         >=dev-python/traitlets-4.1[${PYTHON_USEDEP}]
24         dev-python/jupyter_core[${PYTHON_USEDEP}]
25         "
26 DEPEND="${RDEPEND}
27         doc? (
28                 dev-python/sphinx[${PYTHON_USEDEP}]
29                 dev-python/numpydoc[${PYTHON_USEDEP}]
30         )
31         test? (
32                 dev-python/testpath[${PYTHON_USEDEP}]
33                 dev-python/pytest[${PYTHON_USEDEP}]
34                 dev-python/pytest-cov[${PYTHON_USEDEP}]
35         )
36         "
37
38 python_prepare_all() {
39         # Prevent un-needed download during build
40         if use doc; then
41                 sed -e "/^    'sphinx.ext.intersphinx',/d" -i docs/conf.py || die
42         fi
43
44         distutils-r1_python_prepare_all
45 }
46
47 python_compile_all() {
48         if use doc; then
49                 emake -C docs html
50                 HTML_DOCS=( docs/_build/html/. )
51         fi
52 }
53
54 python_test() {
55         distutils_install_for_testing
56         cd "${TEST_DIR}"/lib || die
57         py.test -v --cov nbformat nbformat || die
58 }