1 |
commit: ece1201e42e780360e57add25949a5d4018c585d |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 17 22:42:19 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 29 11:42:13 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ece1201e |
7 |
|
8 |
install-qa-check.d: Make DUS check distinguish entry points |
9 |
|
10 |
Make DISTUTILS_USE_SETUPTOOLS check explicitly distinguish rdepend due |
11 |
to entry points from explicit rdepend. This currently does not change |
12 |
the result but it will change in the future. |
13 |
|
14 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
15 |
|
16 |
metadata/install-qa-check.d/60distutils-use-setuptools | 16 ++++++++-------- |
17 |
1 file changed, 8 insertions(+), 8 deletions(-) |
18 |
|
19 |
diff --git a/metadata/install-qa-check.d/60distutils-use-setuptools b/metadata/install-qa-check.d/60distutils-use-setuptools |
20 |
index 3b9523fcdab..8970a6ab998 100644 |
21 |
--- a/metadata/install-qa-check.d/60distutils-use-setuptools |
22 |
+++ b/metadata/install-qa-check.d/60distutils-use-setuptools |
23 |
@@ -1,4 +1,4 @@ |
24 |
-# Copyright 2020 Gentoo Authors |
25 |
+# Copyright 2020-2021 Gentoo Authors |
26 |
# Distributed under the terms of the GNU General Public License v2 |
27 |
|
28 |
# QA check: verify correctness of DISTUTILS_USE_SETUPTOOLS |
29 |
@@ -24,17 +24,16 @@ distutils_use_setuptools_check() { |
30 |
if [[ -f ${egg} ]]; then |
31 |
# if .egg-info is a file, it's plain distutils |
32 |
new_expected=no |
33 |
- elif grep -q -s -F '[console_scripts]' \ |
34 |
- "${egg}"/entry_points.txt |
35 |
- then |
36 |
- # entry_points == we need rdepend |
37 |
- new_expected=rdepend |
38 |
elif [[ -f ${egg}/requires.txt ]] && |
39 |
grep -q -s '^setuptools' \ |
40 |
<(sed -e '/^\[/,$d' "${egg}"/requires.txt) |
41 |
then |
42 |
# explicit *unconditional* rdepend in package metadata |
43 |
new_expected=rdepend |
44 |
+ elif grep -q -s -F '[console_scripts]' \ |
45 |
+ "${egg}"/entry_points.txt |
46 |
+ then |
47 |
+ new_expected=entry-point |
48 |
else |
49 |
new_expected=bdepend |
50 |
fi |
51 |
@@ -46,7 +45,6 @@ distutils_use_setuptools_check() { |
52 |
fi |
53 |
done |
54 |
|
55 |
- # at this point, expected can contain: no bdepend rdepend |
56 |
if [[ ${#expected[@]} -gt 1 ]] && has no "${expected[@]}"; then |
57 |
# 'no' and '[rb]depend' are mutually exclusive |
58 |
eerror "The package seems to have used distutils and setuptools simultaneously." |
59 |
@@ -54,8 +52,10 @@ distutils_use_setuptools_check() { |
60 |
eerror "https://dev.gentoo.org/~mgorny/python-guide/distutils.html#conditional-distutils-setuptools-use-in-packages" |
61 |
eerror "Please report a bug about this and CC python@" |
62 |
elif [[ ${#expected[@]} -gt 0 ]]; then |
63 |
- # bdepend+rdepend=rdepend |
64 |
+ # *+rdepend=rdepend |
65 |
has rdepend "${expected[@]}" && expected=( rdepend ) |
66 |
+ # for the time being, entry points imply rdepend |
67 |
+ has entry-point "${expected[@]}" && expected=( rdepend ) |
68 |
# at this point, expected should have exactly one value |
69 |
[[ ${#expected[@]} -eq 1 ]] || die "integrity error" |