Here's another medium-sized patchset for Python eclasses.  The primary
feature is support for the new gpep517 9+ option to byte-compile
installed .pyc files.  As a result, rather than delaying until
python_install(), we get optimized .pyc already in python_compile()
and the test phase should be faster.

This implies a minor change to DISTUTILS_USE_PEP517=no behavior -- we're
no longer calling python_optimize implicitly, so if the ebuild does not
compile bytecode, it needs to call python_optimize explicitly now.
This mode is used only by a few ebuilds right now, so I'm including
updates to them as well.  On the plus side, it now avoids compiling .py
files twice in the remaining ebuilds.

The other major change included is rewriting the .pyc install-qa-check.d
to use the new "gpep517 verify-pyc" command rather than implementing
the checks in bash.  Since gpep517 is a dep of all ebuilds inheriting
distutils-r1, this should be a relatively safe place to put
the functionality, and so the check should work reliably in most
of the environments.  This also includes more correct checking of
whether .pyc files are up-to-date that couldn't be done in bash because
it impacted performance *a lot*.

The other changes include a fix for obsolete pyproject.toml
recommendation, the usual build system minimal version updates,
disabling pytest-sugar plugin in epytest (that makes test output awful)
and fixing EPREFIX in addpredict invocations.

Michał Górny (11):
  distutils-r1.eclass: Update pyproject.toml advice for PEP517 mode
  distutils-r1.eclass: Require gpep517 >= 8
  install-qa-check.d: Rewrite 60python-pyc to use gpep517
  distutils-r1.eclass: Bump dev-python/sip dependency
  distutils-r1.eclass: Pass EPREFIX to addpredict
  distutils-r1.eclass: Let gpep517 compile bytecode when 9+ is used
  dev-python/installer: Call python_optimize explicitly
  dev-python/tomli: Call python_optimize explicitly
  net-wireless/blueman: Invoke eautomake to fix py-compile script
  dev-python/pygobject: Call python_optimize explicitly
  python-utils-r1.eclass: Sterilize pytest-sugar plugin

 .../installer/installer-0.5.1-r1.ebuild       |   5 +
 dev-python/pygobject/pygobject-3.42.2.ebuild  |   1 +
 dev-python/tomli/tomli-2.0.1-r1.ebuild        |   5 +
 eclass/distutils-r1.eclass                    |  52 ++++--
 eclass/python-utils-r1.eclass                 |   3 +
 metadata/install-qa-check.d/60python-pyc      | 168 ++++++++++--------
 net-wireless/blueman/blueman-2.3.1.ebuild     |   2 +-
 net-wireless/blueman/blueman-9999.ebuild      |   2 +-
 8 files changed, 146 insertions(+), 92 deletions(-)


Reply via email to