summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass')
-rw-r--r--eclass/distutils-r1.eclass17
1 files changed, 10 insertions, 7 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 5ffc91be479c..c5c954f49250 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: distutils-r1.eclass
@@ -316,22 +316,25 @@ distutils_enable_sphinx() {
_DISTUTILS_SPHINX_PLUGINS=( "${@}" )
local deps autodoc=1 d
+ deps="dev-python/sphinx[\${PYTHON_USEDEP}]"
for d; do
if [[ ${d} == --no-autodoc ]]; then
autodoc=
else
deps+="
${d}[\${PYTHON_USEDEP}]"
+ if [[ ! ${autodoc} ]]; then
+ die "${FUNCNAME}: do not pass --no-autodoc if external plugins are used"
+ fi
fi
done
- if [[ ! ${autodoc} && -n ${deps} ]]; then
- die "${FUNCNAME}: do not pass --no-autodoc if external plugins are used"
- fi
if [[ ${autodoc} ]]; then
- deps="$(python_gen_any_dep "
- dev-python/sphinx[\${PYTHON_USEDEP}]
- ${deps}")"
+ if [[ ${DISTUTILS_SINGLE_IMPL} ]]; then
+ deps="$(python_gen_cond_dep "${deps}")"
+ else
+ deps="$(python_gen_any_dep "${deps}")"
+ fi
python_check_deps() {
use doc || return 0