commit:     c7299c1ecaed5e1103b9a07c08386d8457a2dd73
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  2 08:08:36 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jul  2 08:29:17 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7299c1e

distutils-r1.eclass: Fix pyproject.toml w/ single-r1

Closes: https://bugs.gentoo.org/730426
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 eclass/distutils-r1.eclass | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index d29abf71fe3..092c0887d87 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -116,40 +116,40 @@ fi
 if [[ ! ${_DISTUTILS_R1} ]]; then
 
 _distutils_set_globals() {
-       local rdep=${PYTHON_DEPS}
-       local bdep=${rdep}
-
-       if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
-               local sdep=">=dev-python/setuptools-42.0.2[${PYTHON_USEDEP}]"
-       else
-               local sdep="$(python_gen_cond_dep '
-                       >=dev-python/setuptools-42.0.2[${PYTHON_MULTI_USEDEP}]
-               ')"
-       fi
+       local rdep bdep
+       local setuptools_dep='>=dev-python/setuptools-42.0.2[${PYTHON_USEDEP}]'
 
        case ${DISTUTILS_USE_SETUPTOOLS} in
                no|manual)
                        ;;
                bdepend)
-                       bdep+=" ${sdep}"
+                       bdep+=" ${setuptools_dep}"
                        ;;
                rdepend)
-                       bdep+=" ${sdep}"
-                       rdep+=" ${sdep}"
+                       bdep+=" ${setuptools_dep}"
+                       rdep+=" ${setuptools_dep}"
                        ;;
                pyproject.toml)
-                       bdep+=" dev-python/pyproject2setuppy[${PYTHON_USEDEP}]"
+                       bdep+=' dev-python/pyproject2setuppy[${PYTHON_USEDEP}]'
                        ;;
                *)
                        die "Invalid 
DISTUTILS_USE_SETUPTOOLS=${DISTUTILS_USE_SETUPTOOLS}"
                        ;;
        esac
 
-       RDEPEND=${rdep}
+       if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
+               bdep=${bdep//\$\{PYTHON_USEDEP\}/${PYTHON_USEDEP}}
+               rdep=${rdep//\$\{PYTHON_USEDEP\}/${PYTHON_USEDEP}}
+       else
+               [[ -n ${bdep} ]] && bdep="$(python_gen_cond_dep "${bdep}")"
+               [[ -n ${rdep} ]] && rdep="$(python_gen_cond_dep "${rdep}")"
+       fi
+
+       RDEPEND="${PYTHON_DEPS} ${rdep}"
        if [[ ${EAPI} != [56] ]]; then
-               BDEPEND=${bdep}
+               BDEPEND="${PYTHON_DEPS} ${bdep}"
        else
-               DEPEND=${bdep}
+               DEPEND="${PYTHON_DEPS} ${bdep}"
        fi
        REQUIRED_USE=${PYTHON_REQUIRED_USE}
 }

Reply via email to