1 |
Hi, |
2 |
|
3 |
Few janitorial notes for a start: |
4 |
|
5 |
1. please fix your line wrapping since your messages are wrapped twice |
6 |
now, and it's really hard to read with single words on every second |
7 |
line; |
8 |
|
9 |
2. hardcore Python topics belong on gentoo-python@ but I guess we'll |
10 |
continue here, |
11 |
|
12 |
3. please keep your messages brief. The first three paragraphs tell |
13 |
a thing that could be told in one sentence. |
14 |
|
15 |
On czw, 2017-05-11 at 11:47 +0700, Alex Turbov wrote: |
16 |
> Thus generally specking, Sphinx dependencies have no relations to `DEPEND` |
17 |
> of particular |
18 |
> `dev-python/*` ebuilds! So, in simple case there is should be enough to |
19 |
> specify |
20 |
> |
21 |
> DEPEND=( doc? ( dev-python/sphinx ) ) |
22 |
> |
23 |
> for that ebuilds. In some rare cases (like |
24 |
> https://bugs.gentoo.org/show_bug.cgi?id=618162) |
25 |
> Sphinx could use some extensions (plugins) and they also have no any |
26 |
> relation to `PYTHON_COMPAT` |
27 |
> of particular `dev-python/*` ebuild! That plugins to work need just the |
28 |
> same `PYTHON_TARGETS` |
29 |
> as used to build Sphinx. Unfortunately I can't find appropriate helper |
30 |
> function(s) in any |
31 |
> currently present Python reelated eclasses (or am I miss smth?), so I used |
32 |
> the following |
33 |
> dependency spec: |
34 |
> |
35 |
> DEPEND=( doc? |
36 |
> || ( |
37 |
> ( |
38 |
> dev-python/sphinx[python_targets_python2_7] |
39 |
> # NOTE This packages provide extensions for Sphinx |
40 |
> dev-python/rst-linker[python_targets_python2_7] |
41 |
> dev-python/jaraco-packaging[python_targets_python2_7] |
42 |
> ) |
43 |
> ( |
44 |
> dev-python/sphinx[python_targets_python3_5] |
45 |
> dev-python/rst-linker[python_targets_python3_5] |
46 |
> dev-python/jaraco-packaging[python_targets_python3_5] |
47 |
> ) |
48 |
> ( |
49 |
> dev-python/sphinx[python_targets_python3_6] |
50 |
> dev-python/rst-linker[python_targets_python3_6] |
51 |
> dev-python/jaraco-packaging[python_targets_python3_6] |
52 |
> ) |
53 |
> ) |
54 |
> ) |
55 |
|
56 |
You can't use python_targets directly since it will break when the old |
57 |
implementations are disabled (and also make it PITA for others to add |
58 |
new impls). |
59 |
|
60 |
> |
61 |
> So, my questions are: |
62 |
> |
63 |
> 0. am I missed smth? (and there are some other cases, I don't know about) |
64 |
> 1. am I missed smth? (and there are some helper functions exist in eclasses |
65 |
> to expess that kind |
66 |
> of dependencies) |
67 |
> 2. I think it would be nice to have some support for Sphinx in eclasses to |
68 |
> simplify ebuilds writing |
69 |
> (if #1 is false) |
70 |
> |
71 |
> Ideas/comments/opinions are really welcome... |
72 |
|
73 |
Long story short, it's not worth the effort. |
74 |
|
75 |
Yes, most of the time people specify PYTHON_USEDEP on sphinx needlessly. |
76 |
There are two other major cases when you need it though: |
77 |
|
78 |
1. things like autointerface that interface with packages' code, |
79 |
|
80 |
2. and packages calling sphinx via 'python /usr/bin/sphinx ...' (i.e. |
81 |
requiring impl match between python in use and sphinx). |
82 |
|
83 |
However, tracking the other uses down and figuring them is not worth |
84 |
the effort. In the end, someone will probably add it back thinking |
85 |
someone must've missed it. It's too hard to get it right. |
86 |
|
87 |
In fact, I'm personally leaning towards not building docs at all |
88 |
in ebuilds. It's practically a wasted effort since most of the time |
89 |
users read docs online anyway. |
90 |
|
91 |
Building Sphinx with less implementations than its reverse dependencies |
92 |
is a corner case. It's not really worth spending hours making sure |
93 |
depends are 100% strictly correct. The more important goal is to have |
94 |
things working reliably, and overspecified deps are reliable, i.e. |
95 |
packages won't fail to build because of them. |
96 |
|
97 |
-- |
98 |
Best regards, |
99 |
Michał Górny |