Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: metadata/install-qa-check.d/
Date: Thu, 29 Apr 2021 11:42:25
Message-Id: 1619696535.166c9795548f98e284aa25cad198657138543daa.mgorny@gentoo
1 commit: 166c9795548f98e284aa25cad198657138543daa
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 17 22:50:11 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 29 11:42:15 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=166c9795
7
8 install-qa-check.d: Future-proof entry point values for DUS
9
10 Accept both 'rdepend' and 'bdepend' as DISTUTILS_USE_SETUPTOOLS values
11 for packages installing entry points. Starting with Python 3.8, these
12 packages do not require any runtime dependency. However, we do not want
13 to proactively bother people with updating everything and instead
14 provide the option to start performing opt-in updates.
15
16 Note that technically PyPy3 (that implements Python 3.7 at the moment)
17 continues requiring additional dependencies for entry point support.
18 However, we do not support PyPy3 target in stable and generally do not
19 consider it important enough to maintain extra complexity for.
20
21 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
22
23 .../install-qa-check.d/60distutils-use-setuptools | 20 ++++++++++++++------
24 1 file changed, 14 insertions(+), 6 deletions(-)
25
26 diff --git a/metadata/install-qa-check.d/60distutils-use-setuptools b/metadata/install-qa-check.d/60distutils-use-setuptools
27 index 61209302ef3..69164608fca 100644
28 --- a/metadata/install-qa-check.d/60distutils-use-setuptools
29 +++ b/metadata/install-qa-check.d/60distutils-use-setuptools
30 @@ -57,18 +57,26 @@ distutils_use_setuptools_check() {
31 [[ ${#expected[@]} -eq 0 ]] && expected=( no )
32 # *+rdepend=rdepend
33 has rdepend "${expected[@]}" && expected=( rdepend )
34 - # for the time being, entry points imply rdepend
35 - has entry-point "${expected[@]}" && expected=( rdepend )
36 - # at this point, expected should have exactly one value
37 - [[ ${#expected[@]} -eq 1 ]] || die "integrity error"
38
39 - if [[ ${DISTUTILS_USE_SETUPTOOLS} != ${expected} ]]; then
40 + if has entry-point "${expected[@]}"; then
41 + if [[ ${DISTUTILS_STRICT_ENTRY_POINTS} ]]; then
42 + # option for devs to future-proof their packages
43 + # please don't let ago enable it
44 + expected=( bdepend )
45 + else
46 + # accept either rdepend or bdepend for the time being
47 + # but suggest bdepend as the future-proof option
48 + expected=( bdepend rdepend )
49 + fi
50 + fi
51 +
52 + if ! has ${DISTUTILS_USE_SETUPTOOLS} "${expected[@]}"; then
53 local def=
54 [[ ${DISTUTILS_USE_SETUPTOOLS} == bdepend ]] && def=' (or unset)'
55
56 eqawarn "DISTUTILS_USE_SETUPTOOLS value is probably incorrect"
57 eqawarn " have: DISTUTILS_USE_SETUPTOOLS=${DISTUTILS_USE_SETUPTOOLS}${def}"
58 - eqawarn " expected: DISTUTILS_USE_SETUPTOOLS=${expected}"
59 + eqawarn " expected: DISTUTILS_USE_SETUPTOOLS=${expected[0]}"
60 fi
61 fi
62 }