Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 14/28] python-single-r1.eclass: Ban PYTHON_MULTI_USEDEP in EAPI 8
Date: Sun, 20 Jun 2021 10:00:53
Message-Id: 20210620095552.625633-15-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 00/28] python-r1 suite EAPI 8 support/cleanup by "Michał Górny"
1 PYTHON_MULTI_USEDEP was a temporary transition measure, and is now
2 equivalent to PYTHON_USEDEP. Ban it in EAPI 8 to clean up ebuilds.
3
4 Signed-off-by: Michał Górny <mgorny@g.o>
5 ---
6 eclass/python-single-r1.eclass | 6 ++++++
7 1 file changed, 6 insertions(+)
8
9 diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass
10 index 50ec69fa2ddb..6dd0616aa219 100644
11 --- a/eclass/python-single-r1.eclass
12 +++ b/eclass/python-single-r1.eclass
13 @@ -392,6 +392,12 @@ python_gen_cond_dep() {
14 fi
15 local multi_usedep="python_targets_${impl}(-)"
16
17 + if [[ ${EAPI} != [67] ]]; then
18 + if [[ ${dep} == *\$\{PYTHON_MULTI_USEDEP\}* ]]; then
19 + die "Replace PYTHON_MULTI_USEDEP with PYTHON_USEDEP in EAPI ${EAPI}"
20 + fi
21 + fi
22 +
23 local subdep=${dep//\$\{PYTHON_MULTI_USEDEP\}/${multi_usedep}}
24 matches+=( "python_single_target_${impl}? (
25 ${subdep//\$\{PYTHON_USEDEP\}/${multi_usedep}} )" )
26 --
27 2.32.0