public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 00/30] One batch of Python eclass updates to rule them all
@ 2022-02-06 12:48 Michał Górny
  2022-02-06 12:48 ` [gentoo-dev] [PATCH 01/30] distutils-r1.eclass: Split backend getting code into a function Michał Górny
                   ` (30 more replies)
  0 siblings, 31 replies; 37+ messages in thread
From: Michał Górny @ 2022-02-06 12:48 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

Hi,

Here's the largest batch of eclass updates in quite some time.  They
combine some new features needed for PEP 517 packages, other new
features, refactoring, cleanup and cosmetic changes -- hopefully
to stop the cache updates for some time.

The changes can be also reviewed on GitHub, particularly if you want
to see the big diff rather than the 30 individual changes:
https://github.com/gentoo/gentoo/pull/24065

The highlights are:

1. A new distutils_pep517_install function is introduced that carries
   the "core" PEP 517 functionality (previously inline
   in distutils-r1_python_compile).  This is mostly an internal change,
   except that it can be used to install additional packages required
   for tests (right now isort & pip need it).  New isort revision
   is included.

2. Some deprecated stuff that is no longer used in ::gentoo is removed.
   Since it causes failures in global scope, there's little risk
   of accidentally reintroducing its use.

3. python-any-r1 + python-r1 any-of API is now much more verbose.
   It is explaining why a particular implementations is selected
   or rejected.  In additional to that, a new python_has_version()
   wrapper is introduced that serves as a verbose alternative
   to has_version() for use in python_check_deps().  This particularly
   applies to USE=doc via distutils_enable_sphinx.  (requested by soap)

   Screenshot: https://pbs.twimg.com/media/FK1wBkFXIAElWm7?format=jpg

4. build_sphinx regression when Sphinx is not available for the current
   Python version is fixed.  It was broken by PEP 517 changes.

5. More complex inline Python invocations now use heredoc syntax
   instead of `-c` (thanks to arthurzam for the suggestion!).  This
   improves readability a lot.

6. python_optimize is also more verbose now.

7. python_gen* now accept stdlib versions in additional to exact
   interpreter names.  The primary use is replacing backport deps like:

     $(python_gen_cond_dep ... python3_7 pypy3)

   with more maintanable:

     $(python_gen_cond_dep ... 3.7)

   The big difference is that the latter doesn't need to be updated
   every time PyPy3 switches to a newer stdlib version.

8. The eclasses now issue a QA warning if the ebuild has been updated
   recently (i.e. in 2022, through looking up the Copyright line)
   and PYTHON_COMPAT still lists old implementations.  (requested
   by sam).

9. Minimum tomli dep is raised to aid people who don't update their
   systems often enough.

-- 
Best regards,
Michał Górny


Michał Górny (30):
  distutils-r1.eclass: Split backend getting code into a function
  distutils-r1.eclass: Get wheel name from the backend
  distutils-r1.eclass: Create distutils_pep517_install helper
  dev-python/isort: Switch to PEP 517 build
  python-r1.eclass: Remove deprecated python_gen_usedep
  python-any-r1.eclass: Move EPYTHON validity check to python_setup()
  python-utils-r1.eclass: Add function to run python_check_deps()
  python-any-r1.eclass: Explain the reason for interpreter choice
  python-utils-r1.eclass: Report _python_run_check_deps verbosely
  python-utils-r1.eclass: Inline python_is_installed
  distutils-r1.eclass: Fix has_version for distutils_enable_sphinx
  python-utils-r1.eclass: Add a verbose python_has_version() wrapper
  distutils-r1.eclass: Use python_has_version in ...enable_sphinx
  python-utils-r1.eclass: Fix sphinx_build for non-autodoc case
  python-utils-r1.eclass: Remove deprecated python_export
  python-utils-r1.eclass: Remove python_wrapper_setup
  python-single-r1.eclass: Inline & simplify USE-deps in gen_cond_dep
  python-r1.eclass: Improve comment for USE-dep generation
  python-utils-r1.eclass: Remove python_is_python3
  python-single-r1.eclass: Remove PYTHON_MULTI_USEDEP
  distutils-r1.eclass: Use heredoc instead of "python -c"
  python-utils-r1.eclass: Use heredoc instead of "python -c"
  python-utils-r1.eclass: Remove old phase check from python_optimize
  python-utils-r1.eclass: Add status messages to python_optimize
  python-utils-r1.eclass: Support matching impls by stdlib version
  dev-python/jaraco-text: Use python_gen_cond_dep w/ stdlib ver
  python-any-r1.eclass: Do not test EPYTHON twice
  python-utils-r1.eclass: Add QA check for obsolete PYTHON_COMPAT
  dev-libs/libwacom: Use python_has_version for verbose output
  distutils-r1.eclass: Add min version to tomli dep

 dev-libs/libwacom/libwacom-1.11.ebuild        |   6 +-
 dev-libs/libwacom/libwacom-1.12.ebuild        |   6 +-
 dev-python/isort/isort-5.10.1-r1.ebuild       |  65 +++++
 .../jaraco-text/jaraco-text-3.7.0-r1.ebuild   |   2 +-
 eclass/distutils-r1.eclass                    | 215 ++++++++++-------
 eclass/python-any-r1.eclass                   |  62 ++---
 eclass/python-r1.eclass                       |  97 ++------
 eclass/python-single-r1.eclass                |  68 +-----
 eclass/python-utils-r1.eclass                 | 227 +++++++++++-------
 eclass/tests/python-utils-r1.sh               |   5 -
 10 files changed, 382 insertions(+), 371 deletions(-)
 create mode 100644 dev-python/isort/isort-5.10.1-r1.ebuild

-- 
2.35.1



^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2022-02-09  9:39 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-06 12:48 [gentoo-dev] [PATCH 00/30] One batch of Python eclass updates to rule them all Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 01/30] distutils-r1.eclass: Split backend getting code into a function Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 02/30] distutils-r1.eclass: Get wheel name from the backend Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 03/30] distutils-r1.eclass: Create distutils_pep517_install helper Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 04/30] dev-python/isort: Switch to PEP 517 build Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 05/30] python-r1.eclass: Remove deprecated python_gen_usedep Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 06/30] python-any-r1.eclass: Move EPYTHON validity check to python_setup() Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 07/30] python-utils-r1.eclass: Add function to run python_check_deps() Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 08/30] python-any-r1.eclass: Explain the reason for interpreter choice Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 09/30] python-utils-r1.eclass: Report _python_run_check_deps verbosely Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 10/30] python-utils-r1.eclass: Inline python_is_installed Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 11/30] distutils-r1.eclass: Fix has_version for distutils_enable_sphinx Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 12/30] python-utils-r1.eclass: Add a verbose python_has_version() wrapper Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 13/30] distutils-r1.eclass: Use python_has_version in ...enable_sphinx Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 14/30] python-utils-r1.eclass: Fix sphinx_build for non-autodoc case Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 15/30] python-utils-r1.eclass: Remove deprecated python_export Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 16/30] python-utils-r1.eclass: Remove python_wrapper_setup Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 17/30] python-single-r1.eclass: Inline & simplify USE-deps in gen_cond_dep Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 18/30] python-r1.eclass: Improve comment for USE-dep generation Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 19/30] python-utils-r1.eclass: Remove python_is_python3 Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 20/30] python-single-r1.eclass: Remove PYTHON_MULTI_USEDEP Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 21/30] distutils-r1.eclass: Use heredoc instead of "python -c" Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 22/30] python-utils-r1.eclass: " Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 23/30] python-utils-r1.eclass: Remove old phase check from python_optimize Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 24/30] python-utils-r1.eclass: Add status messages to python_optimize Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 25/30] python-utils-r1.eclass: Support matching impls by stdlib version Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 26/30] dev-python/jaraco-text: Use python_gen_cond_dep w/ stdlib ver Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 27/30] python-any-r1.eclass: Do not test EPYTHON twice Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 28/30] python-utils-r1.eclass: Add QA check for obsolete PYTHON_COMPAT Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 29/30] dev-libs/libwacom: Use python_has_version for verbose output Michał Górny
2022-02-08 23:00   ` Matt Turner
2022-02-08 23:18     ` Matt Turner
2022-02-08 23:54     ` Michał Górny
2022-02-06 12:48 ` [gentoo-dev] [PATCH 30/30] distutils-r1.eclass: Add min version to tomli dep Michał Górny
2022-02-09  7:34 ` [gentoo-dev] [PATCH 00/30] One batch of Python eclass updates to rule them all Sam James
2022-02-09  9:22   ` Joshua Kinard
2022-02-09  9:39   ` Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox