1 |
Signed-off-by: Michał Górny <mgorny@g.o> |
2 |
--- |
3 |
eclass/python-single-r1.eclass | 35 ++++++++-------------------------- |
4 |
1 file changed, 8 insertions(+), 27 deletions(-) |
5 |
|
6 |
diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass |
7 |
index 438f25134c34..4184b6f132bc 100644 |
8 |
--- a/eclass/python-single-r1.eclass |
9 |
+++ b/eclass/python-single-r1.eclass |
10 |
@@ -89,9 +89,9 @@ EXPORT_FUNCTIONS pkg_setup |
11 |
# |
12 |
# It should be noted that in order to preserve metadata immutability, |
13 |
# PYTHON_COMPAT_OVERRIDE does not affect IUSE nor dependencies. |
14 |
-# The state of PYTHON_TARGETS and PYTHON_SINGLE_TARGET is ignored, |
15 |
-# and the implementation in PYTHON_COMPAT_OVERRIDE is built instead. |
16 |
-# Dependencies need to be satisfied manually. |
17 |
+# The state of PYTHON_SINGLE_TARGET is ignored, and the implementation |
18 |
+# in PYTHON_COMPAT_OVERRIDE is built instead. Dependencies need to be |
19 |
+# satisfied manually. |
20 |
# |
21 |
# Example: |
22 |
# @CODE |
23 |
@@ -178,10 +178,8 @@ EXPORT_FUNCTIONS pkg_setup |
24 |
|
25 |
# @ECLASS-VARIABLE: PYTHON_REQUIRED_USE |
26 |
# @DESCRIPTION: |
27 |
-# This is an eclass-generated required-use expression which ensures the following |
28 |
-# when more than one python implementation is possible: |
29 |
-# 1. Exactly one PYTHON_SINGLE_TARGET value has been enabled. |
30 |
-# 2. The selected PYTHON_SINGLE_TARGET value is enabled in PYTHON_TARGETS. |
31 |
+# This is an eclass-generated required-use expression which ensures |
32 |
+# that exactly one PYTHON_SINGLE_TARGET value has been enabled. |
33 |
# |
34 |
# This expression should be utilized in an ebuild by including it in |
35 |
# REQUIRED_USE, optionally behind a use flag. |
36 |
@@ -193,23 +191,20 @@ EXPORT_FUNCTIONS pkg_setup |
37 |
# |
38 |
# Example value: |
39 |
# @CODE |
40 |
-# python_single_target_python2_7? ( python_targets_python2_7 ) |
41 |
-# python_single_target_python3_3? ( python_targets_python3_3 ) |
42 |
# ^^ ( python_single_target_python2_7 python_single_target_python3_3 ) |
43 |
# @CODE |
44 |
|
45 |
_python_single_set_globals() { |
46 |
_python_set_impls |
47 |
|
48 |
- local flags_mt=( "${_PYTHON_SUPPORTED_IMPLS[@]/#/python_targets_}" ) |
49 |
local flags=( "${_PYTHON_SUPPORTED_IMPLS[@]/#/python_single_target_}" ) |
50 |
|
51 |
if [[ ${#_PYTHON_SUPPORTED_IMPLS[@]} -eq 1 ]]; then |
52 |
# if only one implementation is supported, use IUSE defaults |
53 |
# to avoid requesting the user to enable it |
54 |
- IUSE="+${flags_mt[0]} +${flags[0]}" |
55 |
+ IUSE="+${flags[0]}" |
56 |
else |
57 |
- IUSE="${flags_mt[*]} ${flags[*]}" |
58 |
+ IUSE="${flags[*]}" |
59 |
fi |
60 |
|
61 |
local requse="^^ ( ${flags[*]} )" |
62 |
@@ -218,11 +213,6 @@ _python_single_set_globals() { |
63 |
|
64 |
local deps= i PYTHON_PKG_DEP |
65 |
for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do |
66 |
- # The chosen targets need to be in PYTHON_TARGETS as well. |
67 |
- # This is in order to enforce correct dependencies on packages |
68 |
- # supporting multiple implementations. |
69 |
- requse+=" python_single_target_${i}? ( python_targets_${i} )" |
70 |
- |
71 |
python_export "${i}" PYTHON_PKG_DEP |
72 |
# 1) well, python-exec would suffice as an RDEP |
73 |
# but no point in making this overcomplex, BDEP doesn't hurt anyone |
74 |
@@ -490,15 +480,6 @@ python_setup() { |
75 |
die "More than one implementation in PYTHON_SINGLE_TARGET." |
76 |
fi |
77 |
|
78 |
- if ! use "python_targets_${impl}"; then |
79 |
- eerror "The implementation chosen as PYTHON_SINGLE_TARGET must be added" |
80 |
- eerror "to PYTHON_TARGETS as well. This is in order to ensure that" |
81 |
- eerror "dependencies are satisfied correctly. We're sorry" |
82 |
- eerror "for the inconvenience." |
83 |
- echo |
84 |
- die "Build target (${impl}) not in PYTHON_TARGETS." |
85 |
- fi |
86 |
- |
87 |
python_export "${impl}" EPYTHON PYTHON |
88 |
python_wrapper_setup |
89 |
fi |
90 |
@@ -511,7 +492,7 @@ python_setup() { |
91 |
eerror |
92 |
eerror "${_PYTHON_SUPPORTED_IMPLS[@]}" |
93 |
echo |
94 |
- die "No supported Python implementation in PYTHON_SINGLE_TARGET/PYTHON_TARGETS." |
95 |
+ die "No supported Python implementation in PYTHON_SINGLE_TARGET." |
96 |
fi |
97 |
} |
98 |
|
99 |
-- |
100 |
2.24.0 |