commit:     b9810954053e699b3b743bf059a1b91b4776763c
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 17 22:45:15 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Apr 29 11:42:14 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9810954

install-qa-check.d: Extend DUS check to handle no egg-info

If the package does not install any .egg-info files, i.e. distutils
is probably not used at all, we do not the eclass to create a setuptools
dependency.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 metadata/install-qa-check.d/60distutils-use-setuptools | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/metadata/install-qa-check.d/60distutils-use-setuptools 
b/metadata/install-qa-check.d/60distutils-use-setuptools
index 8970a6ab998..61209302ef3 100644
--- a/metadata/install-qa-check.d/60distutils-use-setuptools
+++ b/metadata/install-qa-check.d/60distutils-use-setuptools
@@ -51,7 +51,10 @@ distutils_use_setuptools_check() {
                eerror "This could mean the package has bad conditions:"
                eerror 
"https://dev.gentoo.org/~mgorny/python-guide/distutils.html#conditional-distutils-setuptools-use-in-packages";
                eerror "Please report a bug about this and CC python@"
-       elif [[ ${#expected[@]} -gt 0 ]]; then
+       else
+               # if we did not find anything, also assume 'no' is desired,
+               # we do not want the setuptools dep
+               [[ ${#expected[@]} -eq 0 ]] && expected=( no )
                # *+rdepend=rdepend
                has rdepend "${expected[@]}" && expected=( rdepend )
                # for the time being, entry points imply rdepend

Reply via email to