From 97e0420ad66d0705edd16616dafa2654f9ec79cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 25 Nov 2019 13:24:52 +0100 Subject: [PATCH] dev-python/flask: Use distutils_enable_sphinx MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- dev-python/flask/flask-1.1.1.ebuild | 19 ++----------------- dev-python/flask/flask-9999.ebuild | 21 +++------------------ 2 files changed, 5 insertions(+), 35 deletions(-) diff --git a/dev-python/flask/flask-1.1.1.ebuild b/dev-python/flask/flask-1.1.1.ebuild index df4778024021..3cfa93664536 100644 --- a/dev-python/flask/flask-1.1.1.ebuild +++ b/dev-python/flask/flask-1.1.1.ebuild @@ -22,7 +22,7 @@ fi LICENSE="BSD" SLOT="0" -IUSE="doc examples test" +IUSE="examples test" RESTRICT="!test? ( test )" RDEPEND="dev-python/click[${PYTHON_USEDEP}] @@ -32,7 +32,6 @@ RDEPEND="dev-python/click[${PYTHON_USEDEP}] >=dev-python/werkzeug-0.15[${PYTHON_USEDEP}]" DEPEND="${RDEPEND} dev-python/setuptools[${PYTHON_USEDEP}] - doc? ( $(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}]') ) test? ( dev-python/pytest[${PYTHON_USEDEP}] )" PATCHES=( @@ -40,20 +39,7 @@ PATCHES=( "${FILESDIR}/flask-1.1.1-py38.patch" ) -python_check_deps() { - use doc || return 0 - has_version "dev-python/sphinx[${PYTHON_USEDEP}]" -} - -python_prepare_all() { - # Prevent un-needed d'loading - sed -e "s/ 'sphinx.ext.intersphinx',//" -i docs/conf.py || die - distutils-r1_python_prepare_all -} - -python_compile_all() { - use doc && emake -C docs html -} +distutils_enable_sphinx docs python_test() { PYTHONPATH=${S}/examples/flaskr:${S}/examples/minitwit${PYTHONPATH:+:${PYTHONPATH}} \ @@ -62,7 +48,6 @@ python_test() { python_install_all() { use examples && dodoc -r examples - use doc && HTML_DOCS=( docs/_build/html/. ) distutils-r1_python_install_all } diff --git a/dev-python/flask/flask-9999.ebuild b/dev-python/flask/flask-9999.ebuild index 6c634728d160..ab417690d6fe 100644 --- a/dev-python/flask/flask-9999.ebuild +++ b/dev-python/flask/flask-9999.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy{,3} ) +PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} pypy{,3} ) inherit distutils-r1 @@ -22,7 +22,7 @@ fi LICENSE="BSD" SLOT="0" -IUSE="doc examples test" +IUSE="examples test" RESTRICT="!test? ( test )" RDEPEND="dev-python/click[${PYTHON_USEDEP}] @@ -32,23 +32,9 @@ RDEPEND="dev-python/click[${PYTHON_USEDEP}] >=dev-python/werkzeug-0.15[${PYTHON_USEDEP}]" DEPEND="${RDEPEND} dev-python/setuptools[${PYTHON_USEDEP}] - doc? ( $(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}]') ) test? ( dev-python/pytest[${PYTHON_USEDEP}] )" -python_check_deps() { - use doc || return 0 - has_version "dev-python/sphinx[${PYTHON_USEDEP}]" -} - -python_prepare_all() { - # Prevent un-needed d'loading - sed -e "s/ 'sphinx.ext.intersphinx',//" -i docs/conf.py || die - distutils-r1_python_prepare_all -} - -python_compile_all() { - use doc && emake -C docs html -} +distutils_enable_sphinx docs python_test() { PYTHONPATH=${S}/examples/flaskr:${S}/examples/minitwit${PYTHONPATH:+:${PYTHONPATH}} \ @@ -57,7 +43,6 @@ python_test() { python_install_all() { use examples && dodoc -r examples - use doc && HTML_DOCS=( docs/_build/html/. ) distutils-r1_python_install_all } -- 2.26.2