Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: python@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 05/25] distutils-r2.eclass: Make all old QA warnings fatal
Date: Sat, 29 Feb 2020 20:44:15
Message-Id: 20200229204201.99290-6-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 00/25] python-r2 eclass suite by "Michał Górny"
1 Signed-off-by: Michał Górny <mgorny@g.o>
2 ---
3 eclass/distutils-r2.eclass | 23 ++++++++---------------
4 1 file changed, 8 insertions(+), 15 deletions(-)
5
6 diff --git a/eclass/distutils-r2.eclass b/eclass/distutils-r2.eclass
7 index 66df9e8f7272..1b3f9e89fc49 100644
8 --- a/eclass/distutils-r2.eclass
9 +++ b/eclass/distutils-r2.eclass
10 @@ -93,7 +93,6 @@ esac
11
12 if [[ ! ${_DISTUTILS_R2} ]]; then
13
14 -[[ ${EAPI} == [456] ]] && inherit eutils
15 [[ ${EAPI} == [56] ]] && inherit xdg-utils
16 inherit multiprocessing toolchain-funcs
17
18 @@ -462,9 +461,10 @@ _distutils_verify_use_setuptools() {
19 local def=
20 [[ ${DISTUTILS_USE_SETUPTOOLS} == bdepend ]] && def=' (default?)'
21
22 - eqawarn "DISTUTILS_USE_SETUPTOOLS value is probably incorrect"
23 - eqawarn " value: DISTUTILS_USE_SETUPTOOLS=${DISTUTILS_USE_SETUPTOOLS}${def}"
24 - eqawarn " expected: DISTUTILS_USE_SETUPTOOLS=${expected}"
25 + ewarn "DISTUTILS_USE_SETUPTOOLS value is probably incorrect"
26 + ewarn " value: DISTUTILS_USE_SETUPTOOLS=${DISTUTILS_USE_SETUPTOOLS}${def}"
27 + ewarn " expected: DISTUTILS_USE_SETUPTOOLS=${expected}"
28 + die "Incorrect DISTUTILS_USE_SETUPTOOLS"
29 fi
30 fi
31 }
32 @@ -852,9 +852,7 @@ distutils-r2_python_install() {
33 ${shopt_save}
34
35 if [[ -n ${pypy_dirs} ]]; then
36 - local cmd=die
37 - [[ ${EAPI} == [45] ]] && cmd=eqawarn
38 - "${cmd}" "Package installs 'share' in PyPy prefix, see bug #465546."
39 + die "Package installs 'share' in PyPy prefix, see bug #465546."
40 fi
41
42 if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
43 @@ -1001,10 +999,7 @@ distutils-r2_src_prepare() {
44 fi
45
46 if [[ ! ${_DISTUTILS_DEFAULT_CALLED} ]]; then
47 - local cmd=die
48 - [[ ${EAPI} == [45] ]] && cmd=eqawarn
49 -
50 - "${cmd}" "QA: python_prepare_all() didn't call distutils-r2_python_prepare_all"
51 + die "QA: python_prepare_all() didn't call distutils-r2_python_prepare_all"
52 fi
53
54 if declare -f python_prepare >/dev/null; then
55 @@ -1086,6 +1081,7 @@ _distutils-r2_check_namespace_pth() {
56 ewarn "the ebuild accordingly:"
57 ewarn
58 ewarn " https://wiki.gentoo.org/wiki/Project:Python/Namespace_packages"
59 + die ".pth files installed"
60 fi
61 }
62
63 @@ -1107,10 +1103,7 @@ distutils-r2_src_install() {
64 fi
65
66 if [[ ! ${_DISTUTILS_DEFAULT_CALLED} ]]; then
67 - local cmd=die
68 - [[ ${EAPI} == [45] ]] && cmd=eqawarn
69 -
70 - "${cmd}" "QA: python_install_all() didn't call distutils-r2_python_install_all"
71 + die "QA: python_install_all() didn't call distutils-r2_python_install_all"
72 fi
73
74 _distutils-r2_check_namespace_pth
75 --
76 2.25.1