1 |
Remove the QA hack for PYTHON_USEDEP that originally prevented python-r1 |
2 |
ebuilds from wrongly depending on python-single-r1 packages. Since |
3 |
the latter no longer define python_targets*, these dependencies are now |
4 |
caught without any hacks. |
5 |
|
6 |
Signed-off-by: Michał Górny <mgorny@g.o> |
7 |
--- |
8 |
eclass/python-r1.eclass | 18 ++++-------------- |
9 |
1 file changed, 4 insertions(+), 14 deletions(-) |
10 |
|
11 |
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass |
12 |
index 00555e19d605..539076b5f748 100644 |
13 |
--- a/eclass/python-r1.eclass |
14 |
+++ b/eclass/python-r1.eclass |
15 |
@@ -203,15 +203,6 @@ _python_set_globals() { |
16 |
|
17 |
local flags=( "${_PYTHON_SUPPORTED_IMPLS[@]/#/python_targets_}" ) |
18 |
local optflags=${flags[@]/%/(-)?} |
19 |
- |
20 |
- # A nice QA trick here. Since a python-single-r1 package has to have |
21 |
- # at least one PYTHON_SINGLE_TARGET enabled (REQUIRED_USE), |
22 |
- # the following check will always fail on those packages. Therefore, |
23 |
- # it should prevent developers from mistakenly depending on packages |
24 |
- # not supporting multiple Python implementations. |
25 |
- |
26 |
- local flags_st=( "${_PYTHON_SUPPORTED_IMPLS[@]/#/-python_single_target_}" ) |
27 |
- optflags+=,${flags_st[@]/%/(-)} |
28 |
local requse="|| ( ${flags[*]} )" |
29 |
local usedep=${optflags// /,} |
30 |
|
31 |
@@ -321,7 +312,6 @@ _python_gen_usedep() { |
32 |
if _python_impl_matches "${impl}" "${@}"; then |
33 |
matches+=( |
34 |
"python_targets_${impl}(-)?" |
35 |
- "-python_single_target_${impl}(-)" |
36 |
) |
37 |
fi |
38 |
done |
39 |
@@ -572,8 +562,8 @@ python_gen_impl_dep() { |
40 |
# ( |
41 |
# dev-lang/python:3.8 |
42 |
# dev-python/foo[python_single_target_python3_8(-)] |
43 |
-# || ( dev-python/bar[python_targets_python3_8(-),-python_single_target_python3_8(-)] |
44 |
-# dev-python/baz[python_targets_python3_8(-),-python_single_target_python3_8(-)] ) |
45 |
+# || ( dev-python/bar[python_targets_python3_8(-)] |
46 |
+# dev-python/baz[python_targets_python3_8(-)] ) |
47 |
# ) |
48 |
# ) |
49 |
# @CODE |
50 |
@@ -587,7 +577,7 @@ python_gen_any_dep() { |
51 |
_python_verify_patterns "${@}" |
52 |
for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do |
53 |
if _python_impl_matches "${i}" "${@}"; then |
54 |
- local PYTHON_USEDEP="python_targets_${i}(-),-python_single_target_${i}(-)" |
55 |
+ local PYTHON_USEDEP="python_targets_${i}(-)" |
56 |
local PYTHON_SINGLE_USEDEP="python_single_target_${i}(-)" |
57 |
_python_export "${i}" PYTHON_PKG_DEP |
58 |
|
59 |
@@ -799,7 +789,7 @@ python_setup() { |
60 |
# first check if the interpreter is installed |
61 |
python_is_installed "${impl}" || continue |
62 |
# then run python_check_deps |
63 |
- local PYTHON_USEDEP="python_targets_${impl}(-),-python_single_target_${impl}(-)" |
64 |
+ local PYTHON_USEDEP="python_targets_${impl}(-)" |
65 |
local PYTHON_SINGLE_USEDEP="python_single_target_${impl}(-)" |
66 |
python_check_deps || continue |
67 |
fi |
68 |
-- |
69 |
2.32.0 |