1 |
Signed-off-by: David Seifert <soap@g.o> |
2 |
--- |
3 |
eclass/docs.eclass | 2 +- |
4 |
eclass/mate.eclass | 2 +- |
5 |
eclass/python-any-r1.eclass | 2 +- |
6 |
eclass/python-r1.eclass | 27 ++++++++------------------- |
7 |
eclass/python-single-r1.eclass | 2 +- |
8 |
eclass/scons-utils.eclass | 2 +- |
9 |
eclass/waf-utils.eclass | 2 +- |
10 |
7 files changed, 14 insertions(+), 25 deletions(-) |
11 |
|
12 |
diff --git a/eclass/docs.eclass b/eclass/docs.eclass |
13 |
index 859e8048893..f4663c3575f 100644 |
14 |
--- a/eclass/docs.eclass |
15 |
+++ b/eclass/docs.eclass |
16 |
@@ -153,7 +153,7 @@ _DOCS_ECLASS=1 |
17 |
case ${DOCS_BUILDER} in |
18 |
"sphinx"|"mkdocs") |
19 |
# We need the python_gen_any_dep function |
20 |
- if [[ ! ${_PYTHON_R1} && ! ${_PYTHON_ANY_R1_ECLASS} && ! ${_PYTHON_SINGLE_R1} ]]; then |
21 |
+ if [[ ! ${_PYTHON_R1_ECLASS} && ! ${_PYTHON_ANY_R1_ECLASS} && ! ${_PYTHON_SINGLE_R1} ]]; then |
22 |
die "distutils-r1, python-r1, python-single-r1 or python-any-r1 needs to be inherited to use python based documentation builders" |
23 |
fi |
24 |
;; |
25 |
diff --git a/eclass/mate.eclass b/eclass/mate.eclass |
26 |
index 66b4cf44624..c1886648140 100644 |
27 |
--- a/eclass/mate.eclass |
28 |
+++ b/eclass/mate.eclass |
29 |
@@ -45,7 +45,7 @@ DEPEND=">=mate-base/mate-common-${MATE_BRANCH}" |
30 |
# This function should only be used if the ebuild also inherits the |
31 |
# python-r1 eclass |
32 |
mate_py_cond_func_wrap() { |
33 |
- if [[ ! ${_PYTHON_R1} ]]; then |
34 |
+ if [[ ! ${_PYTHON_R1_ECLASS} ]]; then |
35 |
die "This function requires the inheritence of the python-r1 eclass" |
36 |
fi |
37 |
if use python; then |
38 |
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass |
39 |
index bec15f7ca0b..7474ef0474b 100644 |
40 |
--- a/eclass/python-any-r1.eclass |
41 |
+++ b/eclass/python-any-r1.eclass |
42 |
@@ -46,7 +46,7 @@ esac |
43 |
if [[ ! ${_PYTHON_ANY_R1_ECLASS} ]]; then |
44 |
_PYTHON_ANY_R1_ECLASS=1 |
45 |
|
46 |
-if [[ ${_PYTHON_R1} ]]; then |
47 |
+if [[ ${_PYTHON_R1_ECLASS} ]]; then |
48 |
die 'python-any-r1.eclass can not be used with python-r1.eclass.' |
49 |
elif [[ ${_PYTHON_SINGLE_R1} ]]; then |
50 |
die 'python-any-r1.eclass can not be used with python-single-r1.eclass.' |
51 |
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass |
52 |
index bc10e83cf78..52822c5f47b 100644 |
53 |
--- a/eclass/python-r1.eclass |
54 |
+++ b/eclass/python-r1.eclass |
55 |
@@ -7,7 +7,7 @@ |
56 |
# @AUTHOR: |
57 |
# Author: Michał Górny <mgorny@g.o> |
58 |
# Based on work of: Krzysztof Pawlik <nelchael@g.o> |
59 |
-# @SUPPORTED_EAPIS: 6 7 8 |
60 |
+# @SUPPORTED_EAPIS: 7 8 |
61 |
# @PROVIDES: multibuild python-utils-r1 |
62 |
# @BLURB: A common, simple eclass for Python packages. |
63 |
# @DESCRIPTION: |
64 |
@@ -30,18 +30,13 @@ |
65 |
# For more information, please see the Python Guide: |
66 |
# https://projects.gentoo.org/python/guide/ |
67 |
|
68 |
-case "${EAPI:-0}" in |
69 |
- [0-5]) |
70 |
- die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" |
71 |
- ;; |
72 |
- [6-8]) |
73 |
- ;; |
74 |
- *) |
75 |
- die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" |
76 |
- ;; |
77 |
+case ${EAPI} in |
78 |
+ 7|8) ;; |
79 |
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; |
80 |
esac |
81 |
|
82 |
-if [[ ! ${_PYTHON_R1} ]]; then |
83 |
+if [[ ! ${_PYTHON_R1_ECLASS} ]]; then |
84 |
+_PYTHON_R1_ECLASS=1 |
85 |
|
86 |
if [[ ${_PYTHON_SINGLE_R1} ]]; then |
87 |
die 'python-r1.eclass can not be used with python-single-r1.eclass.' |
88 |
@@ -49,11 +44,8 @@ elif [[ ${_PYTHON_ANY_R1_ECLASS} ]]; then |
89 |
die 'python-r1.eclass can not be used with python-any-r1.eclass.' |
90 |
fi |
91 |
|
92 |
-[[ ${EAPI} == 6 ]] && inherit eqawarn |
93 |
inherit multibuild python-utils-r1 |
94 |
|
95 |
-fi |
96 |
- |
97 |
# @ECLASS_VARIABLE: PYTHON_COMPAT |
98 |
# @REQUIRED |
99 |
# @DESCRIPTION: |
100 |
@@ -244,8 +236,6 @@ _python_set_globals() { |
101 |
_python_set_globals |
102 |
unset -f _python_set_globals |
103 |
|
104 |
-if [[ ! ${_PYTHON_R1} ]]; then |
105 |
- |
106 |
# @FUNCTION: _python_validate_useflags |
107 |
# @INTERNAL |
108 |
# @DESCRIPTION: |
109 |
@@ -636,7 +626,7 @@ python_foreach_impl() { |
110 |
eqawarn "instead." |
111 |
_DISTUTILS_FOREACH_IMPL_WARNED=1 |
112 |
|
113 |
- if ! has "${EAPI}" 6 7 8; then |
114 |
+ if ! has "${EAPI}" 7 8; then |
115 |
die "Calling python_foreach_impl from distutils-r1 is banned in EAPI ${EAPI}" |
116 |
fi |
117 |
fi |
118 |
@@ -805,10 +795,9 @@ python_replicate_script() { |
119 |
local f |
120 |
for f; do |
121 |
local dosym=dosym |
122 |
- [[ ${EAPI} == [67] ]] && dosym=dosym8 |
123 |
+ [[ ${EAPI} == 7 ]] && dosym=dosym8 |
124 |
"${dosym}" -r /usr/lib/python-exec/python-exec2 "${f#${ED}}" |
125 |
done |
126 |
} |
127 |
|
128 |
-_PYTHON_R1=1 |
129 |
fi |
130 |
diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass |
131 |
index 59673d2a5bf..790477c1472 100644 |
132 |
--- a/eclass/python-single-r1.eclass |
133 |
+++ b/eclass/python-single-r1.eclass |
134 |
@@ -50,7 +50,7 @@ esac |
135 |
|
136 |
if [[ ! ${_PYTHON_SINGLE_R1} ]]; then |
137 |
|
138 |
-if [[ ${_PYTHON_R1} ]]; then |
139 |
+if [[ ${_PYTHON_R1_ECLASS} ]]; then |
140 |
die 'python-single-r1.eclass can not be used with python-r1.eclass.' |
141 |
elif [[ ${_PYTHON_ANY_R1_ECLASS} ]]; then |
142 |
die 'python-single-r1.eclass can not be used with python-any-r1.eclass.' |
143 |
diff --git a/eclass/scons-utils.eclass b/eclass/scons-utils.eclass |
144 |
index 9fc048cadcd..619230ecca6 100644 |
145 |
--- a/eclass/scons-utils.eclass |
146 |
+++ b/eclass/scons-utils.eclass |
147 |
@@ -108,7 +108,7 @@ elif [[ ${_PYTHON_SINGLE_R1} ]]; then |
148 |
BDEPEND=" |
149 |
$(python_gen_cond_dep "${SCONS_DEPEND}[\${PYTHON_USEDEP}]") |
150 |
${PYTHON_DEPS}" |
151 |
-elif [[ ${_PYTHON_R1} ]]; then |
152 |
+elif [[ ${_PYTHON_R1_ECLASS} ]]; then |
153 |
# when using python-r1, you need to depend on scons yourself |
154 |
# (depending on whether you need any-r1 or full -r1 API) |
155 |
# -- since this is a breaking API change, it applies to EAPI 7+ only |
156 |
diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass |
157 |
index e08515e4502..61994e73bed 100644 |
158 |
--- a/eclass/waf-utils.eclass |
159 |
+++ b/eclass/waf-utils.eclass |
160 |
@@ -41,7 +41,7 @@ waf-utils_src_configure() { |
161 |
debug-print-function ${FUNCNAME} "$@" |
162 |
|
163 |
local fail |
164 |
- if [[ ! ${_PYTHON_ANY_R1_ECLASS} && ! ${_PYTHON_SINGLE_R1} && ! ${_PYTHON_R1} ]]; then |
165 |
+ if [[ ! ${_PYTHON_ANY_R1_ECLASS} && ! ${_PYTHON_SINGLE_R1} && ! ${_PYTHON_R1_ECLASS} ]]; then |
166 |
eerror "Using waf-utils.eclass without any python-r1 suite eclass is not supported." |
167 |
eerror "Please make sure to configure and inherit appropriate -r1 eclass." |
168 |
eerror "For more information and examples, please see:" |
169 |
-- |
170 |
2.39.0 |