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 2/4] install-qa-check.d: Extend DUS check to handle no egg-info
Date: Sun, 18 Apr 2021 12:35:49
Message-Id: 20210418123454.35060-3-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 0/4] install-qa-check.d/60distutils-use-setuptools future-proof and fixes by "Michał Górny"
1 If the package does not install any .egg-info files, i.e. distutils
2 is probably not used at all, we do not the eclass to create a setuptools
3 dependency.
4
5 Signed-off-by: Michał Górny <mgorny@g.o>
6 ---
7 metadata/install-qa-check.d/60distutils-use-setuptools | 5 ++++-
8 1 file changed, 4 insertions(+), 1 deletion(-)
9
10 diff --git a/metadata/install-qa-check.d/60distutils-use-setuptools b/metadata/install-qa-check.d/60distutils-use-setuptools
11 index 8970a6ab9989..61209302ef3e 100644
12 --- a/metadata/install-qa-check.d/60distutils-use-setuptools
13 +++ b/metadata/install-qa-check.d/60distutils-use-setuptools
14 @@ -51,7 +51,10 @@ distutils_use_setuptools_check() {
15 eerror "This could mean the package has bad conditions:"
16 eerror "https://dev.gentoo.org/~mgorny/python-guide/distutils.html#conditional-distutils-setuptools-use-in-packages"
17 eerror "Please report a bug about this and CC python@"
18 - elif [[ ${#expected[@]} -gt 0 ]]; then
19 + else
20 + # if we did not find anything, also assume 'no' is desired,
21 + # we do not want the setuptools dep
22 + [[ ${#expected[@]} -eq 0 ]] && expected=( no )
23 # *+rdepend=rdepend
24 has rdepend "${expected[@]}" && expected=( rdepend )
25 # for the time being, entry points imply rdepend
26 --
27 2.31.1