commit: 90954a726ff21bdd541382730142eef99df4a2bd Author: Sean Vig <sean.v.775 <AT> gmail <DOT> com> AuthorDate: Wed Sep 2 18:27:51 2015 +0000 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> CommitDate: Thu Sep 3 13:16:48 2015 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=90954a72
dev-python/jupyter_core: Add doc use flag dev-python/jupyter_core/ChangeLog | 3 +++ dev-python/jupyter_core/jupyter_core-9999.ebuild | 21 ++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/dev-python/jupyter_core/ChangeLog b/dev-python/jupyter_core/ChangeLog index 0d51b02..7c55e61 100644 --- a/dev-python/jupyter_core/ChangeLog +++ b/dev-python/jupyter_core/ChangeLog @@ -3,6 +3,9 @@ # $Id$ 02 Sep 2015; Sean Vig <[email protected]> jupyter_core-9999.ebuild: + dev-python/jupyter_core: Add doc use flag + + 02 Sep 2015; Sean Vig <[email protected]> jupyter_core-9999.ebuild: dev-python/jupyter_core: Fix testing deps *jupyter_core-4.0.4-r1 (03 Sep 2015) diff --git a/dev-python/jupyter_core/jupyter_core-9999.ebuild b/dev-python/jupyter_core/jupyter_core-9999.ebuild index cc4b41d..6e067ba 100644 --- a/dev-python/jupyter_core/jupyter_core-9999.ebuild +++ b/dev-python/jupyter_core/jupyter_core-9999.ebuild @@ -20,12 +20,13 @@ fi LICENSE="BSD" SLOT="0" -IUSE="test" +IUSE="doc test" RDEPEND=" dev-python/traitlets[${PYTHON_USEDEP}] " DEPEND="${RDEPEND} + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) test? ( dev-python/pytest[${PYTHON_USEDEP}] dev-python/pytest-cov[${PYTHON_USEDEP}] @@ -33,8 +34,26 @@ DEPEND="${RDEPEND} ) " +python_prepare_all() { + # Prevent un-needed download during build + if use doc; then + sed -e "/^ 'sphinx.ext.intersphinx',/d" -i docs/conf.py || die + fi + + distutils-r1_python_prepare_all +} + +python_compile_all() { + use doc && emake -C docs html +} + python_test() { distutils_install_for_testing cd "${TEST_DIR}"/lib || die py.test jupyter_core || die } + +python_install_all() { + use doc && HTML_DOCS=( docs/_build/html/. ) + distutils-r1_python_install_all +}
