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 11/30] distutils-r1.eclass: Fix has_version for distutils_enable_sphinx
Date: Sun, 06 Feb 2022 12:52:31
Message-Id: 20220206124841.1299133-12-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 00/30] One batch of Python eclass updates to rule them all by "Michał Górny"
1 Fix the has_version calls for distutils_enable_sphinx to use -b option
2 (--host-root in earlier EAPIs).
3
4 Signed-off-by: Michał Górny <mgorny@g.o>
5 ---
6 eclass/distutils-r1.eclass | 6 +++++-
7 1 file changed, 5 insertions(+), 1 deletion(-)
8
9 diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
10 index 814ee85a2b1f..c0b04cf7d997 100644
11 --- a/eclass/distutils-r1.eclass
12 +++ b/eclass/distutils-r1.eclass
13 @@ -426,9 +426,13 @@ distutils_enable_sphinx() {
14
15 python_check_deps() {
16 use doc || return 0
17 +
18 + local hasv_args=( -b )
19 + [[ ${EAPI} == 6 ]] && hasv_args=( --host-root )
20 local p
21 for p in dev-python/sphinx "${_DISTUTILS_SPHINX_PLUGINS[@]}"; do
22 - has_version "${p}[${PYTHON_USEDEP}]" || return 1
23 + has_version "${hasv_args[@]}" "${p}[${PYTHON_USEDEP}]" ||
24 + return 1
25 done
26 }
27 else
28 --
29 2.35.1