1 |
To replace the checks with ones suitable for PyPy3. |
2 |
--- |
3 |
gx86/eclass/python-utils-r1.eclass | 14 ++++++++++++++ |
4 |
1 file changed, 14 insertions(+) |
5 |
|
6 |
diff --git a/gx86/eclass/python-utils-r1.eclass b/gx86/eclass/python-utils-r1.eclass |
7 |
index 5814a13..00399d2 100644 |
8 |
--- a/gx86/eclass/python-utils-r1.eclass |
9 |
+++ b/gx86/eclass/python-utils-r1.eclass |
10 |
@@ -942,5 +942,19 @@ __EOF__ |
11 |
fi |
12 |
} |
13 |
|
14 |
+# @FUNCTION: python_is_python3 |
15 |
+# @USAGE: [<impl>] |
16 |
+# @DESCRIPTION: |
17 |
+# Check whether <impl> (or ${EPYTHON}) is a Python3k variant |
18 |
+# (i.e. uses syntax and stdlib of Python 3.*). |
19 |
+# |
20 |
+# Returns 0 (true) if it is, 1 (false) otherwise. |
21 |
+python_is_python3() { |
22 |
+ local impl=${1:-${EPYTHON}} |
23 |
+ [[ ${impl} ]] || die "python_is_python3: no impl nor EPYTHON" |
24 |
+ |
25 |
+ [[ ${impl} == python3* ]] |
26 |
+} |
27 |
+ |
28 |
_PYTHON_UTILS_R1=1 |
29 |
fi |
30 |
-- |
31 |
1.8.3.2 |