Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 4/6] distutils-r1.eclass: Move DISTUTILS_OPTIONAL check into set_globals
Date: Mon, 31 Jan 2022 23:00:48
Message-Id: 20220131225920.192125-5-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 0/6] Another batch of distutils-r1.eclass fixes by "Michał Górny"
1 Signed-off-by: Michał Górny <mgorny@g.o>
2 ---
3 eclass/distutils-r1.eclass | 16 +++++++++-------
4 1 file changed, 9 insertions(+), 7 deletions(-)
5
6 diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
7 index 8942a6149c93..4a9fdb4018b4 100644
8 --- a/eclass/distutils-r1.eclass
9 +++ b/eclass/distutils-r1.eclass
10 @@ -213,15 +213,17 @@ _distutils_set_globals() {
11 [[ -n ${rdep} ]] && rdep="$(python_gen_cond_dep "${rdep}")"
12 fi
13
14 - RDEPEND="${PYTHON_DEPS} ${rdep}"
15 - if [[ ${EAPI} != 6 ]]; then
16 - BDEPEND="${PYTHON_DEPS} ${bdep}"
17 - else
18 - DEPEND="${PYTHON_DEPS} ${bdep}"
19 + if [[ ! ${DISTUTILS_OPTIONAL} ]]; then
20 + RDEPEND="${PYTHON_DEPS} ${rdep}"
21 + if [[ ${EAPI} != 6 ]]; then
22 + BDEPEND="${PYTHON_DEPS} ${bdep}"
23 + else
24 + DEPEND="${PYTHON_DEPS} ${bdep}"
25 + fi
26 + REQUIRED_USE=${PYTHON_REQUIRED_USE}
27 fi
28 - REQUIRED_USE=${PYTHON_REQUIRED_USE}
29 }
30 -[[ ! ${DISTUTILS_OPTIONAL} ]] && _distutils_set_globals
31 +_distutils_set_globals
32 unset -f _distutils_set_globals
33
34 # @ECLASS-VARIABLE: PATCHES
35 --
36 2.35.1