1 |
On Fri, 2019-11-15 at 09:05 +0100, Michał Górny wrote: |
2 |
> On Wed, 2019-11-13 at 22:16 +0100, Michał Górny wrote: |
3 |
> > I'd like to share my frustration at the state of Python in general, |
4 |
> > and Python packages in Gentoo. So I'd like to 'bootstrap' python3_8 -- |
5 |
> > that is, add it to the most common dependency, dev-python/setuptools. |
6 |
> > Simple thing, right? |
7 |
> > |
8 |
> |
9 |
> Well, it turned out that things are worse than I anticipated. |
10 |
> I expected *some* minor test breakage. What we have instead is packages |
11 |
> being so broken that they break a lot of other packages. |
12 |
> |
13 |
> So I went with plan B instead: I'll do as much testing locally |
14 |
> as possible, and add py3.8 when I manage to get the tests on the package |
15 |
> in question working, independently of the testing of all deep test deps. |
16 |
> This will mean that some packages will have tests disabled temporarily |
17 |
> for end users. |
18 |
> |
19 |
|
20 |
Good news, everyone. We have 3.8-enabled setuptools, pytest and nose |
21 |
which should be sufficient to start testing other packages. |
22 |
|
23 |
Of other common packages, dev-python/sphinx isn't 3.8-enabled yet. |
24 |
However, this gives a good exercise of improving sphinx deps. That is: |
25 |
|
26 |
1. If package uses sphinx only to build docs from .rst files, has no |
27 |
extra deps and doesn't use code introspection, you can just drop |
28 |
PYTHON_USEDEP. |
29 |
|
30 |
2. Likewise but if it has extra deps, you can use the very hard any-r1 |
31 |
API in python-r1 (distutils-r1). This has the advantage that it uses |
32 |
any-of deps, and doesn't require matching PYTHON_TARGETS. Example: |
33 |
|
34 |
BDEPEND=" |
35 |
doc? ( $(python_gen_any_dep ' |
36 |
dev-python/sphinx[${PYTHON_USEDEP}] |
37 |
dev-python/sphinx-some-random-theme[${PYTHON_USEDEP}] |
38 |
')" |
39 |
|
40 |
python_check_deps() { |
41 |
use doc || return 0 |
42 |
has_version "dev-python/sphinx[${PYTHON_USEDEP}]" && |
43 |
has_version "dev-python/sphinx-some-random-theme[${PYTHON_USEDEP}]" |
44 |
} |
45 |
|
46 |
python_compile_all { |
47 |
use doc && usual_stuff |
48 |
} |
49 |
|
50 |
|
51 |
-- |
52 |
Best regards, |
53 |
Michał Górny |