Gentoo Archives: gentoo-dev

From: Andrew Ammerlaan <andrewammerlaan@××××××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [PATCH 1/1]: distutils-r1.eclass: make distutils_enable_sphinx compatible with DISTUTILS_SINGLE_IMPL
Date: Sat, 16 Jan 2021 13:49:57
Message-Id: 5a158ab1-cab3-b7ff-071c-bd97c8cf5b8d@riseup.net
1 See my previous email for the rational behind these changes. This closes
2 https://bugs.gentoo.org/704520 and the PR is here:
3 https://github.com/gentoo/gentoo/pull/19078
4
5 This eclass is maintained by @mgorny, so I would like to hear his
6 thoughts on these changes in particular.
7
8 Best regards,
9 Andrew
10
11
12 From 9645afdcd4efa7702b538e70bcf2fc4fec93c245 Mon Sep 17 00:00:00 2001
13 From: Andrew Ammerlaan <andrewammerlaan@××××××.net>
14 Date: Sat, 16 Jan 2021 14:27:00 +0100
15 Subject: [PATCH] eclass/distutils-r1: fix distutils_enable_sphinx with
16 DISTUTILS_SINGLE_IMPL
17
18 python-single-r1 does not have the python_gen_any_dep function
19 use the python_gen_cond_dep instead
20
21 Closes: https://bugs.gentoo.org/704520
22
23 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@××××××.net>
24 ---
25 eclass/distutils-r1.eclass | 12 +++++++++---
26 1 file changed, 9 insertions(+), 3 deletions(-)
27
28 diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
29 index 5ffc91be479cb..e2c1e1e403a76 100644
30 --- a/eclass/distutils-r1.eclass
31 +++ b/eclass/distutils-r1.eclass
32 @@ -329,9 +329,15 @@ distutils_enable_sphinx() {
33 die "${FUNCNAME}: do not pass --no-autodoc if external plugins are used"
34 fi
35 if [[ ${autodoc} ]]; then
36 - deps="$(python_gen_any_dep "
37 - dev-python/sphinx[\${PYTHON_USEDEP}]
38 - ${deps}")"
39 + if [[ ${DISTUTILS_SINGLE_IMPL} ]]; then
40 + deps="$(python_gen_cond_dep "
41 + dev-python/sphinx[\${PYTHON_USEDEP}]
42 + ${deps}")"
43 + else
44 + deps="$(python_gen_any_dep "
45 + dev-python/sphinx[\${PYTHON_USEDEP}]
46 + ${deps}")"
47 + fi
48
49 python_check_deps() {
50 use doc || return 0

Replies