1 |
Signed-off-by: David Seifert <soap@g.o> |
2 |
--- |
3 |
eclass/docs.eclass | 2 +- |
4 |
eclass/python-any-r1.eclass | 21 ++++++++------------- |
5 |
eclass/python-r1.eclass | 2 +- |
6 |
eclass/python-single-r1.eclass | 2 +- |
7 |
eclass/scons-utils.eclass | 4 ++-- |
8 |
eclass/waf-utils.eclass | 4 ++-- |
9 |
6 files changed, 15 insertions(+), 20 deletions(-) |
10 |
|
11 |
diff --git a/eclass/docs.eclass b/eclass/docs.eclass |
12 |
index ed1558bc9a8..859e8048893 100644 |
13 |
--- a/eclass/docs.eclass |
14 |
+++ b/eclass/docs.eclass |
15 |
@@ -153,7 +153,7 @@ _DOCS_ECLASS=1 |
16 |
case ${DOCS_BUILDER} in |
17 |
"sphinx"|"mkdocs") |
18 |
# We need the python_gen_any_dep function |
19 |
- if [[ ! ${_PYTHON_R1} && ! ${_PYTHON_ANY_R1} && ! ${_PYTHON_SINGLE_R1} ]]; then |
20 |
+ if [[ ! ${_PYTHON_R1} && ! ${_PYTHON_ANY_R1_ECLASS} && ! ${_PYTHON_SINGLE_R1} ]]; then |
21 |
die "distutils-r1, python-r1, python-single-r1 or python-any-r1 needs to be inherited to use python based documentation builders" |
22 |
fi |
23 |
;; |
24 |
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass |
25 |
index 558f725f74b..bec15f7ca0b 100644 |
26 |
--- a/eclass/python-any-r1.eclass |
27 |
+++ b/eclass/python-any-r1.eclass |
28 |
@@ -7,7 +7,7 @@ |
29 |
# @AUTHOR: |
30 |
# Author: Michał Górny <mgorny@g.o> |
31 |
# Based on work of: Krzysztof Pawlik <nelchael@g.o> |
32 |
-# @SUPPORTED_EAPIS: 6 7 8 |
33 |
+# @SUPPORTED_EAPIS: 7 8 |
34 |
# @PROVIDES: python-utils-r1 |
35 |
# @BLURB: An eclass for packages having build-time dependency on Python. |
36 |
# @DESCRIPTION: |
37 |
@@ -38,13 +38,13 @@ |
38 |
# For more information, please see the Python Guide: |
39 |
# https://projects.gentoo.org/python/guide/ |
40 |
|
41 |
-case "${EAPI:-0}" in |
42 |
- [0-5]) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;; |
43 |
- [6-8]) ;; |
44 |
- *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" ;; |
45 |
+case ${EAPI} in |
46 |
+ 7|8) ;; |
47 |
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; |
48 |
esac |
49 |
|
50 |
-if [[ ! ${_PYTHON_ANY_R1} ]]; then |
51 |
+if [[ ! ${_PYTHON_ANY_R1_ECLASS} ]]; then |
52 |
+_PYTHON_ANY_R1_ECLASS=1 |
53 |
|
54 |
if [[ ${_PYTHON_R1} ]]; then |
55 |
die 'python-any-r1.eclass can not be used with python-r1.eclass.' |
56 |
@@ -54,10 +54,6 @@ fi |
57 |
|
58 |
inherit python-utils-r1 |
59 |
|
60 |
-fi |
61 |
- |
62 |
-EXPORT_FUNCTIONS pkg_setup |
63 |
- |
64 |
# @ECLASS_VARIABLE: PYTHON_COMPAT |
65 |
# @REQUIRED |
66 |
# @DESCRIPTION: |
67 |
@@ -205,8 +201,6 @@ _python_any_set_globals() { |
68 |
_python_any_set_globals |
69 |
unset -f _python_any_set_globals |
70 |
|
71 |
-if [[ ! ${_PYTHON_ANY_R1} ]]; then |
72 |
- |
73 |
# @FUNCTION: python_gen_any_dep |
74 |
# @USAGE: <dependency-block> |
75 |
# @DESCRIPTION: |
76 |
@@ -348,5 +342,6 @@ python-any-r1_pkg_setup() { |
77 |
[[ ${MERGE_TYPE} != binary ]] && python_setup |
78 |
} |
79 |
|
80 |
-_PYTHON_ANY_R1=1 |
81 |
fi |
82 |
+ |
83 |
+EXPORT_FUNCTIONS pkg_setup |
84 |
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass |
85 |
index caa37bc54ae..bc10e83cf78 100644 |
86 |
--- a/eclass/python-r1.eclass |
87 |
+++ b/eclass/python-r1.eclass |
88 |
@@ -45,7 +45,7 @@ if [[ ! ${_PYTHON_R1} ]]; then |
89 |
|
90 |
if [[ ${_PYTHON_SINGLE_R1} ]]; then |
91 |
die 'python-r1.eclass can not be used with python-single-r1.eclass.' |
92 |
-elif [[ ${_PYTHON_ANY_R1} ]]; then |
93 |
+elif [[ ${_PYTHON_ANY_R1_ECLASS} ]]; then |
94 |
die 'python-r1.eclass can not be used with python-any-r1.eclass.' |
95 |
fi |
96 |
|
97 |
diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass |
98 |
index 740c3283d1b..59673d2a5bf 100644 |
99 |
--- a/eclass/python-single-r1.eclass |
100 |
+++ b/eclass/python-single-r1.eclass |
101 |
@@ -52,7 +52,7 @@ if [[ ! ${_PYTHON_SINGLE_R1} ]]; then |
102 |
|
103 |
if [[ ${_PYTHON_R1} ]]; then |
104 |
die 'python-single-r1.eclass can not be used with python-r1.eclass.' |
105 |
-elif [[ ${_PYTHON_ANY_R1} ]]; then |
106 |
+elif [[ ${_PYTHON_ANY_R1_ECLASS} ]]; then |
107 |
die 'python-single-r1.eclass can not be used with python-any-r1.eclass.' |
108 |
fi |
109 |
|
110 |
diff --git a/eclass/scons-utils.eclass b/eclass/scons-utils.eclass |
111 |
index acb51300f34..9fc048cadcd 100644 |
112 |
--- a/eclass/scons-utils.eclass |
113 |
+++ b/eclass/scons-utils.eclass |
114 |
@@ -95,7 +95,7 @@ inherit multiprocessing |
115 |
|
116 |
SCONS_DEPEND=">=dev-util/scons-${SCONS_MIN_VERSION}" |
117 |
|
118 |
-if [[ ${_PYTHON_ANY_R1} ]]; then |
119 |
+if [[ ${_PYTHON_ANY_R1_ECLASS} ]]; then |
120 |
# when using python-any-r1, use any-of dep API |
121 |
BDEPEND="$(python_gen_any_dep "${SCONS_DEPEND}[\${PYTHON_USEDEP}]")" |
122 |
|
123 |
@@ -137,7 +137,7 @@ escons() { |
124 |
if [[ ! ${EPYTHON} ]]; then |
125 |
eerror "EPYTHON is unset while calling escons. This most likely means that" |
126 |
eerror "the ebuild did not call the appropriate eclass function before calling scons." |
127 |
- if [[ ${_PYTHON_ANY_R1} ]]; then |
128 |
+ if [[ ${_PYTHON_ANY_R1_ECLASS} ]]; then |
129 |
eerror "Please ensure that python-any-r1_pkg_setup is called in pkg_setup()." |
130 |
elif [[ ${_PYTHON_SINGLE_R1} ]]; then |
131 |
eerror "Please ensure that python-single-r1_pkg_setup is called in pkg_setup()." |
132 |
diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass |
133 |
index 3ff74db0d79..e08515e4502 100644 |
134 |
--- a/eclass/waf-utils.eclass |
135 |
+++ b/eclass/waf-utils.eclass |
136 |
@@ -41,7 +41,7 @@ waf-utils_src_configure() { |
137 |
debug-print-function ${FUNCNAME} "$@" |
138 |
|
139 |
local fail |
140 |
- if [[ ! ${_PYTHON_ANY_R1} && ! ${_PYTHON_SINGLE_R1} && ! ${_PYTHON_R1} ]]; then |
141 |
+ if [[ ! ${_PYTHON_ANY_R1_ECLASS} && ! ${_PYTHON_SINGLE_R1} && ! ${_PYTHON_R1} ]]; then |
142 |
eerror "Using waf-utils.eclass without any python-r1 suite eclass is not supported." |
143 |
eerror "Please make sure to configure and inherit appropriate -r1 eclass." |
144 |
eerror "For more information and examples, please see:" |
145 |
@@ -51,7 +51,7 @@ waf-utils_src_configure() { |
146 |
if [[ ! ${EPYTHON} ]]; then |
147 |
eerror "EPYTHON is unset while calling waf-utils. This most likely means that" |
148 |
eerror "the ebuild did not call the appropriate eclass function before calling waf." |
149 |
- if [[ ${_PYTHON_ANY_R1} ]]; then |
150 |
+ if [[ ${_PYTHON_ANY_R1_ECLASS} ]]; then |
151 |
eerror "Please ensure that python-any-r1_pkg_setup is called in pkg_setup()." |
152 |
elif [[ ${_PYTHON_SINGLE_R1} ]]; then |
153 |
eerror "Please ensure that python-single-r1_pkg_setup is called in pkg_setup()." |
154 |
-- |
155 |
2.39.0 |