Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: python@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH] distutils-r1.eclass: Permit DISTUTILS_USE_SETUPTOOLS=manual
Date: Sat, 21 Dec 2019 07:12:58
Message-Id: 20191221071225.10792-1-mgorny@gentoo.org
1 Add a new DISTUTILS_USE_SETUPTOOLS option to permit manually setting
2 the dependencies correctly and suppressing the check.
3
4 Requested by Arfrever.
5
6 Signed-off-by: Michał Górny <mgorny@g.o>
7 ---
8 eclass/distutils-r1.eclass | 7 +++++--
9 1 file changed, 5 insertions(+), 2 deletions(-)
10
11 diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
12 index fae25ea8a5ec..65294a065da7 100644
13 --- a/eclass/distutils-r1.eclass
14 +++ b/eclass/distutils-r1.eclass
15 @@ -1,4 +1,4 @@
16 -# Copyright 1999-2018 Gentoo Foundation
17 +# Copyright 1999-2019 Gentoo Authors
18 # Distributed under the terms of the GNU General Public License v2
19
20 # @ECLASS: distutils-r1.eclass
21 @@ -86,6 +86,8 @@ esac
22 # - no -- do not add the dependency (pure distutils package)
23 # - bdepend -- add it to BDEPEND (the default)
24 # - rdepend -- add it to BDEPEND+RDEPEND (when using entry_points)
25 +# - manual -- do not add the depedency and suppress the checks
26 +# (assumes you will take care of doing it correctly)
27 #
28 # This variable is effective only if DISTUTILS_OPTIONAL is disabled.
29 # It needs to be set before the inherit line.
30 @@ -116,7 +118,7 @@ _distutils_set_globals() {
31 local bdep=${rdep}
32
33 case ${DISTUTILS_USE_SETUPTOOLS} in
34 - no)
35 + no|manual)
36 ;;
37 bdepend)
38 bdep+=" dev-python/setuptools[${PYTHON_USEDEP}]"
39 @@ -436,6 +438,7 @@ distutils_enable_tests() {
40 # incorrectly.
41 _distutils_verify_use_setuptools() {
42 [[ ${DISTUTILS_OPTIONAL} ]] && return
43 + [[ ${DISTUTILS_USE_SETUPTOOLS} == manual ]] && return
44
45 # ok, those are cheap greps. we can try toimprove them if we hit
46 # false positives.
47 --
48 2.24.1