mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-25 21:08:35 -07:00
dev-python/flask: Use distutils_enable_sphinx
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user