1 |
version 2: now prepending dev-python/sphinx before calling |
2 |
python_gen_*_dep functions as suggested by @mgorny. The check that |
3 |
prevents --no-autodoc form being set while additional dependencies are |
4 |
added is moved into the if statement, because ${deps} is now always non |
5 |
empty. |
6 |
|
7 |
Best regards, |
8 |
Andrew |
9 |
|
10 |
On 16/01/2021 18:19, Michał Górny wrote: |
11 |
> On Sat, 2021-01-16 at 14:49 +0100, Andrew Ammerlaan wrote: |
12 |
>> See my previous email for the rational behind these changes. This closes |
13 |
>> https://bugs.gentoo.org/704520 and the PR is here: |
14 |
>> https://github.com/gentoo/gentoo/pull/19078 |
15 |
>> |
16 |
>> This eclass is maintained by @mgorny, so I would like to hear his |
17 |
>> thoughts on these changes in particular. |
18 |
>> |
19 |
>> Best regards, |
20 |
>> Andrew |
21 |
> |
22 |
> I see an opportunity to move prepending sphinx before in the common |
23 |
> code. |
24 |
> |
25 |
|
26 |
|
27 |
From caf841204458e618a1a6d388717a731e7cd94b88 Mon Sep 17 00:00:00 2001 |
28 |
From: Andrew Ammerlaan <andrewammerlaan@××××××.net> |
29 |
Date: Sat, 16 Jan 2021 14:27:00 +0100 |
30 |
Subject: [PATCH] eclass/distutils-r1: fix distutils_enable_sphinx with |
31 |
DISTUTILS_SINGLE_IMPL |
32 |
|
33 |
python-single-r1 does not have the python_gen_any_dep function |
34 |
use the python_gen_cond_dep instead |
35 |
|
36 |
Closes: https://bugs.gentoo.org/704520 |
37 |
|
38 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@××××××.net> |
39 |
--- |
40 |
eclass/distutils-r1.eclass | 15 +++++++++------ |
41 |
1 file changed, 9 insertions(+), 6 deletions(-) |
42 |
|
43 |
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass |
44 |
index 5ffc91be479cb..3d2bec5bfcb32 100644 |
45 |
--- a/eclass/distutils-r1.eclass |
46 |
+++ b/eclass/distutils-r1.eclass |
47 |
@@ -316,22 +316,25 @@ distutils_enable_sphinx() { |
48 |
_DISTUTILS_SPHINX_PLUGINS=( "${@}" ) |
49 |
|
50 |
local deps autodoc=1 d |
51 |
+ deps="dev-python/sphinx[\${PYTHON_USEDEP}]" |
52 |
for d; do |
53 |
if [[ ${d} == --no-autodoc ]]; then |
54 |
autodoc= |
55 |
else |
56 |
deps+=" |
57 |
${d}[\${PYTHON_USEDEP}]" |
58 |
+ if [[ ! ${autodoc} ]]; then |
59 |
+ die "${FUNCNAME}: do not pass --no-autodoc if external plugins are |
60 |
used" |
61 |
+ fi |
62 |
fi |
63 |
done |
64 |
|
65 |
- if [[ ! ${autodoc} && -n ${deps} ]]; then |
66 |
- die "${FUNCNAME}: do not pass --no-autodoc if external plugins are used" |
67 |
- fi |
68 |
if [[ ${autodoc} ]]; then |
69 |
- deps="$(python_gen_any_dep " |
70 |
- dev-python/sphinx[\${PYTHON_USEDEP}] |
71 |
- ${deps}")" |
72 |
+ if [[ ${DISTUTILS_SINGLE_IMPL} ]]; then |
73 |
+ deps="$(python_gen_cond_dep "${deps}")" |
74 |
+ else |
75 |
+ deps="$(python_gen_any_dep "${deps}")" |
76 |
+ fi |
77 |
|
78 |
python_check_deps() { |
79 |
use doc || return 0 |