1 |
Hi, |
2 |
|
3 |
Here's another large-ish patchset for the Python eclass. The primary |
4 |
highlight is DISTUTILS_USE_PEP517=no mode explained below. In addition |
5 |
to that, some refactoring, bug fixes and other changes collected |
6 |
to avoid updating the metadata cache twice. |
7 |
|
8 |
|
9 |
D_U_PEP517=no mode basically gives you the best of distutils-r1 features |
10 |
without default python_* phases or build system-specific dependencies. |
11 |
This means to cover 3 use cases: |
12 |
|
13 |
1) packages that can't use PEP517 to avoid cyclic deps in bootstrap, |
14 |
|
15 |
2) trivial packages without a build system, |
16 |
|
17 |
3) Python-ish packages without a PEP517 build system (e.g. using plain |
18 |
meson). |
19 |
|
20 |
Before, these either required legacy mode (that I'd like to eventually |
21 |
remove, many years from now) or using python-r1 directly. Thanks to |
22 |
the new mode, they can benefit from convenient python_* phases, default |
23 |
Python deps (unless you're using DISTUTILS_OPTIONAL), the test-scope |
24 |
venv logic, distutils_enable_tests, etc. |
25 |
|
26 |
There are two main methods of using it: either declare phases up to |
27 |
python_install() and install files straight to ${D}, or install them |
28 |
to ${BUILD_DIR}/install during python_compile() and the eclass will pick |
29 |
it up. The latter method gives you working venv for python_test() too. |
30 |
|
31 |
I've included a few example ebuilds in the middle of patch set. tomli |
32 |
and installer ebuilds demonstrate using python_compile() to install |
33 |
Python modules and use them in tests. gpep517 uses python_install(). |
34 |
gnome-abrt demonstrates working with meson (yes, I know it's the old |
35 |
version). |
36 |
|
37 |
|
38 |
Other changes are: |
39 |
|
40 |
- removing incidental install of temporary cache files (*-pytest-*.pyc) |
41 |
from epytest |
42 |
|
43 |
- internal refactoring to make post-python_install() QA checks, |
44 |
${BUILD_DIR}/install merging and post-python_compile() test venv setup |
45 |
(in PEP517 mode) work independently of python_compile() |
46 |
and python_install() overrides |
47 |
|
48 |
- *-nspkg.pth warning will become an error in EAPI 9 |
49 |
|
50 |
- python_domodule() now works outside src_install(), by installing |
51 |
into ${BUILD_DIR}/install (and therefore fits part with distutils-r1) |
52 |
|
53 |
- other python_do*() and python_new*() functions now fail if called |
54 |
outside src_install() |
55 |
|
56 |
- add `_trial_temp` to disallowed top-level packages |
57 |
|
58 |
- minor doc fixes |
59 |
|
60 |
|
61 |
-- |
62 |
Best regards, |
63 |
Michał Górny |
64 |
|
65 |
Arthur Zamarin (2): |
66 |
python-any-r1.eclass: use python_has_version in examples |
67 |
distutils-r1.eclass: small docs format fixes |
68 |
|
69 |
Michał Górny (16): |
70 |
python-utils-r1.eclass: Strip stray *-pytest-*.pyc files in epytest |
71 |
distutils-r1.eclass: Support internal post-python_* phase functions |
72 |
distutils-r1.eclass: Call egg-info cleanup via post-test phase |
73 |
distutils-r1.eclass: Move install QA checks to post-phase function |
74 |
distutils-r1.eclass: Remove the obsolete pypy/share check |
75 |
distutils-r1.eclass: Make *-nspkg.pth warning fatal for EAPI 9+ |
76 |
distutils-r1.eclass: Move venv/merge-root logic to post-phases |
77 |
distutils-r1.eclass: Introduce DISTUTILS_USE_PEP517=no mode |
78 |
python-utils-r1.eclass: Fix typo in python_moduleinto doc |
79 |
python-utils-r1.eclass: Support python_domodule outside src_install |
80 |
python-utils-r1.eclass: Add explicit checks for incorrect phase |
81 |
dev-python/tomli: Use DISTUTILS_USE_PEP517=no |
82 |
dev-python/installer: Use DISTUTILS_USE_PEP517=no |
83 |
dev-python/gpep517: Use DISTUTILS_USE_PEP517=no |
84 |
app-admin/gnome-abrt: Use DISTUTILS_USE_PEP517=no |
85 |
distutils-r1.eclass: Add "_trial_temp" to forbidden package names |
86 |
|
87 |
.../gnome-abrt/gnome-abrt-1.4.1-r1.ebuild | 57 +++++ |
88 |
dev-python/gpep517/gpep517-6-r1.ebuild | 41 ++++ |
89 |
.../installer/installer-0.5.1-r1.ebuild | 37 +++ |
90 |
dev-python/tomli/tomli-2.0.1-r1.ebuild | 36 +++ |
91 |
eclass/distutils-r1.eclass | 230 ++++++++++++------ |
92 |
eclass/python-any-r1.eclass | 10 +- |
93 |
eclass/python-utils-r1.eclass | 55 ++++- |
94 |
7 files changed, 369 insertions(+), 97 deletions(-) |
95 |
create mode 100644 app-admin/gnome-abrt/gnome-abrt-1.4.1-r1.ebuild |
96 |
create mode 100644 dev-python/gpep517/gpep517-6-r1.ebuild |
97 |
create mode 100644 dev-python/installer/installer-0.5.1-r1.ebuild |
98 |
create mode 100644 dev-python/tomli/tomli-2.0.1-r1.ebuild |
99 |
|
100 |
-- |
101 |
2.35.1 |