From 0950b698411ea7ffbafe868d231b18181da77e28 Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Sat, 16 Jan 2021 14:27:00 +0100 Subject: eclass/distutils-r1: fix distutils_enable_sphinx with DIS.._SINGLE_IMPL python-single-r1 does not have the python_gen_any_dep function use the python_gen_cond_dep instead Closes: https://bugs.gentoo.org/704520 Signed-off-by: Andrew Ammerlaan Signed-off-by: Joonas Niilola --- eclass/distutils-r1.eclass | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'eclass') 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 -- cgit v1.2.3-65-gdbad