Hi, everyone.

Here's a set of patches inspired by the recent Sphinx dependency
discussion. They make python-r1 (and therefore distutils-r1) capable
of any-of dependency logic similar to the one used in python-any-r1.

The basic goal is relatively simple -- to improve handling of pure
build-time dependencies in the eclass. It solves two common problems:

a. dependencies on packages that support only a subset of PYTHON_COMPAT,

b. dependencies that need to be implementation-bound between themselves
   (e.g. Sphinx plugins).

The new API improves both of those cases significantly. For the former,
we no longer force user to select additional targets via REQUIRED_USE --
instead, we just any-of dependencies + python_check_deps() to select
implementation independently of whether it is enabled or not.

For the latter, we no longer have to force all targets of the package
on all the involved dependencies. Again, using any-of dep
and appropriate python_check_deps() we can enforce a single (any)
target throughout all the packages and use it.

The first three patches do some code refactoring that makes the change
easier and possibly improves maintainability of the code. The next two
patches add support for python_check_deps() and python_gen_any_dep()
respectively. The last two patches provide examples for both use cases
mentioned.

Please review.

--
Best regards,
Michał Górny


Reply via email to