*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / jupyter_console / jupyter_console-6.0.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python3_6 )
7
8 inherit distutils-r1
9
10 DESCRIPTION="A terminal-based console frontend for Jupyter kernels"
11 HOMEPAGE="https://jupyter.org"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
13
14 LICENSE="BSD"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86"
17 IUSE="doc test"
18 RESTRICT="!test? ( test )"
19
20 RDEPEND="
21         dev-python/ipython[${PYTHON_USEDEP}]
22         dev-python/ipykernel[${PYTHON_USEDEP}]
23         dev-python/jupyter_client[${PYTHON_USEDEP}]
24         >=dev-python/prompt_toolkit-1.0.0[${PYTHON_USEDEP}]
25         dev-python/pygments[${PYTHON_USEDEP}]
26         "
27 DEPEND="${RDEPEND}
28         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
29         test? (
30                 $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' 'python2*')
31                 dev-python/pexpect[${PYTHON_USEDEP}]
32                 >=dev-python/nose-0.10.1[${PYTHON_USEDEP}]
33         )
34         "
35
36 python_prepare_all() {
37         # Prevent un-needed download during build
38         if use doc; then
39                 sed -e "/^    'sphinx.ext.intersphinx',/d" -i docs/conf.py || die
40         fi
41
42         distutils-r1_python_prepare_all
43 }
44
45 python_compile_all() {
46         if use doc; then
47                 emake -C docs html
48                 HTML_DOCS=( docs/_build/html/. )
49         fi
50 }
51
52 python_test() {
53         nosetests --with-coverage --cover-package=jupyter_console jupyter_console || die
54 }