summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'metadata')
-rw-r--r--metadata/install-qa-check.d/60distutils-use-setuptools16
1 files 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 3b9523fcdaba..8970a6ab9989 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"