1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{6,7} )
10 DESCRIPTION="Converting Jupyter Notebooks"
11 HOMEPAGE="https://nbconvert.readthedocs.io/"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
16 KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux"
20 dev-python/bleach[${PYTHON_USEDEP}]
21 dev-python/defusedxml[${PYTHON_USEDEP}]
22 >=dev-python/entrypoints-0.2.2[${PYTHON_USEDEP}]
23 dev-python/jinja[${PYTHON_USEDEP}]
24 dev-python/jupyter_core[${PYTHON_USEDEP}]
25 >=dev-python/mistune-0.7.4[${PYTHON_USEDEP}]
26 dev-python/nbformat[${PYTHON_USEDEP}]
27 >=dev-python/pandocfilters-1.4.1[${PYTHON_USEDEP}]
28 dev-python/pygments[${PYTHON_USEDEP}]
29 >=dev-python/traitlets-4.2.1[${PYTHON_USEDEP}]
30 dev-python/testpath[${PYTHON_USEDEP}]
31 www-servers/tornado[${PYTHON_USEDEP}]
34 dev-python/setuptools[${PYTHON_USEDEP}]
37 dev-python/ipython[${PYTHON_USEDEP}]
38 dev-python/jupyter_client[${PYTHON_USEDEP}]
39 dev-python/nbsphinx[${PYTHON_USEDEP}]
40 dev-python/sphinx[${PYTHON_USEDEP}]
41 dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
45 dev-python/nose[${PYTHON_USEDEP}]
46 dev-python/pytest[${PYTHON_USEDEP}]
47 dev-python/ipykernel[${PYTHON_USEDEP}]
48 >=dev-python/jupyter_client-4.2[${PYTHON_USEDEP}]
52 # still failing in many places
55 python_prepare_all() {
56 # Prevent un-needed download during build
58 sed -e "/^ 'sphinx.ext.intersphinx',/d" -i docs/source/conf.py || die
60 distutils-r1_python_prepare_all
63 python_compile_all() {
66 HTML_DOCS=( docs/build/html/. )
71 distutils_install_for_testing
72 cd "${TEST_DIR}"/lib || die
73 pytest -v --pyargs nbconvert || die
77 if ! has_version app-text/pandoc ; then
78 einfo "Pandoc is required for converting to formats other than Python,"
79 einfo "HTML, and Markdown. If you need this functionality, install"
80 einfo "app-text/pandoc."