dev-perl/Class-Inspector: amd64 stable
[gentoo.git] / dev-python / jupyter_core / jupyter_core-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
8 inherit distutils-r1
9
10 DESCRIPTION="Core common functionality of Jupyter projects"
11 HOMEPAGE="http://jupyter.org"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
13
14 LICENSE="BSD"
15 SLOT="0"
16 KEYWORDS="~amd64 ~arm64 ~x86"
17 IUSE="doc test"
18
19 RDEPEND="
20         dev-python/traitlets[${PYTHON_USEDEP}]
21         "
22 DEPEND="${RDEPEND}
23         !!<dev-python/jupyter-1.0.0-r1
24         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
25         test? (
26                 dev-python/pytest[${PYTHON_USEDEP}]
27                 $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' 'python2*')
28                 >=dev-python/ipython-4.0.1[${PYTHON_USEDEP}]
29         )
30         "
31
32 python_prepare_all() {
33         # Prevent un-needed download during build
34         if use doc; then
35                 sed -e "/^    'sphinx.ext.intersphinx',/d" -i docs/conf.py || die
36         fi
37
38         distutils-r1_python_prepare_all
39 }
40
41 python_compile_all() {
42         if use doc; then
43                 emake -C docs html
44                 HTML_DOCS=( docs/_build/html/. )
45         fi
46 }
47
48 python_test() {
49         distutils_install_for_testing
50         cd "${TEST_DIR}"/lib || die
51         py.test jupyter_core || die
52 }