Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 00/11] distutils-r1.eclass: Support for gpep517-9+ --optimize + minor changes
Date: Fri, 29 Jul 2022 10:31:15
Message-Id: 20220729103103.1185162-1-mgorny@gentoo.org
1 Hi,
2
3 Here's another medium-sized patchset for Python eclasses. The primary
4 feature is support for the new gpep517 9+ option to byte-compile
5 installed .pyc files. As a result, rather than delaying until
6 python_install(), we get optimized .pyc already in python_compile()
7 and the test phase should be faster.
8
9 This implies a minor change to DISTUTILS_USE_PEP517=no behavior -- we're
10 no longer calling python_optimize implicitly, so if the ebuild does not
11 compile bytecode, it needs to call python_optimize explicitly now.
12 This mode is used only by a few ebuilds right now, so I'm including
13 updates to them as well. On the plus side, it now avoids compiling .py
14 files twice in the remaining ebuilds.
15
16 The other major change included is rewriting the .pyc install-qa-check.d
17 to use the new "gpep517 verify-pyc" command rather than implementing
18 the checks in bash. Since gpep517 is a dep of all ebuilds inheriting
19 distutils-r1, this should be a relatively safe place to put
20 the functionality, and so the check should work reliably in most
21 of the environments. This also includes more correct checking of
22 whether .pyc files are up-to-date that couldn't be done in bash because
23 it impacted performance *a lot*.
24
25 The other changes include a fix for obsolete pyproject.toml
26 recommendation, the usual build system minimal version updates,
27 disabling pytest-sugar plugin in epytest (that makes test output awful)
28 and fixing EPREFIX in addpredict invocations.
29
30
31 Michał Górny (11):
32 distutils-r1.eclass: Update pyproject.toml advice for PEP517 mode
33 distutils-r1.eclass: Require gpep517 >= 8
34 install-qa-check.d: Rewrite 60python-pyc to use gpep517
35 distutils-r1.eclass: Bump dev-python/sip dependency
36 distutils-r1.eclass: Pass EPREFIX to addpredict
37 distutils-r1.eclass: Let gpep517 compile bytecode when 9+ is used
38 dev-python/installer: Call python_optimize explicitly
39 dev-python/tomli: Call python_optimize explicitly
40 net-wireless/blueman: Invoke eautomake to fix py-compile script
41 dev-python/pygobject: Call python_optimize explicitly
42 python-utils-r1.eclass: Sterilize pytest-sugar plugin
43
44 .../installer/installer-0.5.1-r1.ebuild | 5 +
45 dev-python/pygobject/pygobject-3.42.2.ebuild | 1 +
46 dev-python/tomli/tomli-2.0.1-r1.ebuild | 5 +
47 eclass/distutils-r1.eclass | 52 ++++--
48 eclass/python-utils-r1.eclass | 3 +
49 metadata/install-qa-check.d/60python-pyc | 168 ++++++++++--------
50 net-wireless/blueman/blueman-2.3.1.ebuild | 2 +-
51 net-wireless/blueman/blueman-9999.ebuild | 2 +-
52 8 files changed, 146 insertions(+), 92 deletions(-)
53
54 --
55 2.35.1

Replies