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 1/2] distutils-r1.eclass: Switch setuptools dep to PYTHON_MULTI_USEDEP
Date: Fri, 07 Feb 2020 12:22:55
Message-Id: 20200207122217.503103-1-mgorny@gentoo.org
1 Signed-off-by: Michał Górny <mgorny@g.o>
2 ---
3 eclass/distutils-r1.eclass | 16 ++++++++++++----
4 1 file changed, 12 insertions(+), 4 deletions(-)
5
6 diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
7 index a840769cdecf..3d6866b8db5f 100644
8 --- a/eclass/distutils-r1.eclass
9 +++ b/eclass/distutils-r1.eclass
10 @@ -1,4 +1,4 @@
11 -# Copyright 1999-2019 Gentoo Authors
12 +# Copyright 1999-2020 Gentoo Authors
13 # Distributed under the terms of the GNU General Public License v2
14
15 # @ECLASS: distutils-r1.eclass
16 @@ -117,15 +117,23 @@ _distutils_set_globals() {
17 local rdep=${PYTHON_DEPS}
18 local bdep=${rdep}
19
20 + if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
21 + local sdep="dev-python/setuptools[${PYTHON_USEDEP}]"
22 + else
23 + local sdep="$(python_gen_cond_dep '
24 + dev-python/setuptools[${PYTHON_MULTI_USEDEP}]
25 + ')"
26 + fi
27 +
28 case ${DISTUTILS_USE_SETUPTOOLS} in
29 no|manual)
30 ;;
31 bdepend)
32 - bdep+=" dev-python/setuptools[${PYTHON_USEDEP}]"
33 + bdep+=" ${sdep}"
34 ;;
35 rdepend)
36 - bdep+=" dev-python/setuptools[${PYTHON_USEDEP}]"
37 - rdep+=" dev-python/setuptools[${PYTHON_USEDEP}]"
38 + bdep+=" ${sdep}"
39 + rdep+=" ${sdep}"
40 ;;
41 *)
42 die "Invalid DISTUTILS_USE_SETUPTOOLS=${DISTUTILS_USE_SETUPTOOLS}"
43 --
44 2.25.0

Replies