commit: ece1201e42e780360e57add25949a5d4018c585d
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 17 22:42:19 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Apr 29 11:42:13 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ece1201e
install-qa-check.d: Make DUS check distinguish entry points
Make DISTUTILS_USE_SETUPTOOLS check explicitly distinguish rdepend due
to entry points from explicit rdepend. This currently does not change
the result but it will change in the future.
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
metadata/install-qa-check.d/60distutils-use-setuptools | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/metadata/install-qa-check.d/60distutils-use-setuptools
b/metadata/install-qa-check.d/60distutils-use-setuptools
index 3b9523fcdab..8970a6ab998 100644
--- a/metadata/install-qa-check.d/60distutils-use-setuptools
+++ b/metadata/install-qa-check.d/60distutils-use-setuptools
@@ -1,4 +1,4 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# QA check: verify correctness of DISTUTILS_USE_SETUPTOOLS
@@ -24,17 +24,16 @@ distutils_use_setuptools_check() {
if [[ -f ${egg} ]]; then
# if .egg-info is a file, it's plain
distutils
new_expected=no
- elif grep -q -s -F '[console_scripts]' \
- "${egg}"/entry_points.txt
- then
- # entry_points == we need rdepend
- new_expected=rdepend
elif [[ -f ${egg}/requires.txt ]] &&
grep -q -s '^setuptools' \
<(sed -e '/^\[/,$d'
"${egg}"/requires.txt)
then
# explicit *unconditional* rdepend in
package metadata
new_expected=rdepend
+ elif grep -q -s -F '[console_scripts]' \
+ "${egg}"/entry_points.txt
+ then
+ new_expected=entry-point
else
new_expected=bdepend
fi
@@ -46,7 +45,6 @@ distutils_use_setuptools_check() {
fi
done
- # at this point, expected can contain: no bdepend rdepend
if [[ ${#expected[@]} -gt 1 ]] && has no "${expected[@]}"; then
# 'no' and '[rb]depend' are mutually exclusive
eerror "The package seems to have used distutils and setuptools
simultaneously."
@@ -54,8 +52,10 @@ distutils_use_setuptools_check() {
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
- # bdepend+rdepend=rdepend
+ # *+rdepend=rdepend
has rdepend "${expected[@]}" && expected=( rdepend )
+ # for the time being, entry points imply rdepend
+ has entry-point "${expected[@]}" && expected=( rdepend )
# at this point, expected should have exactly one value
[[ ${#expected[@]} -eq 1 ]] || die "integrity error"