diff options
author | Michał Górny <mgorny@gentoo.org> | 2020-07-02 10:08:36 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2020-07-02 10:29:17 +0200 |
commit | c7299c1ecaed5e1103b9a07c08386d8457a2dd73 (patch) | |
tree | 920a221aaaaf86beb4b8c9c86460104f88b39154 /eclass | |
parent | eclass/tests/distutils-r1:single.sh: Tests for d-r1 single impl mode (diff) | |
download | gentoo-c7299c1ecaed5e1103b9a07c08386d8457a2dd73.tar.gz gentoo-c7299c1ecaed5e1103b9a07c08386d8457a2dd73.tar.bz2 gentoo-c7299c1ecaed5e1103b9a07c08386d8457a2dd73.zip |
distutils-r1.eclass: Fix pyproject.toml w/ single-r1
Closes: https://bugs.gentoo.org/730426
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/distutils-r1.eclass | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index d29abf71fe30..092c0887d878 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} } |