• [gentoo-dev] [PATCH v2 2/3] distutils-r1.eclass: Use python_has_version

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Thu Feb 10 15:50:01 2022
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/distutils-r1.eclass | 4 +---
    1 file changed, 1 insertion(+), 3 deletions(-)

    diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
    index cdd57149720d..c14297d39757 100644
    --- a/eclass/distutils-r1.eclass
    +++ b/eclass/distutils-r1.eclass
    @@ -424,11 +424,9 @@ distutils_enable_sphinx() {
    python_check_deps() {
    use doc || return 0

    - local hasv_args=( -b )
    - [[ ${EAPI} == 6 ]] && hasv_args=( --host-root )
    local p
    for p in dev-python/sphinx "${_DISTUTILS_SPHINX_PLUGINS[@]}"; do
    - has_version "${hasv_args[@]}" "${p}[${PYTHON_USEDEP}]" ||
    + python_has_version "${p}[${PYTHON_USEDEP}]" ||
    return 1
    done
    }
    --
    2.35.1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matt Turner@21:1/5 to mgorny@gentoo.org on Fri Feb 11 00:30:02 2022
    On Thu, Feb 10, 2022 at 6:45 AM Michał Górny <mgorny@gentoo.org> wrote:

    Signed-off-by: Michał Górny <mgorny@gentoo.org>


    Looks good to me. I noticed that this implementation takes only a
    single -b/-d/-r as the initial argument and then a list of packages.
    I'd suggested pairs of -b/-d/-r <pkg> but I think you're right not to
    implement that. I doubt that it's common to need to mix -b/-d/-r.

    Thanks!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?=@21:1/5 to Matt Turner on Fri Feb 11 00:40:01 2022
    On Thu, 2022-02-10 at 15:27 -0800, Matt Turner wrote:
    On Thu, Feb 10, 2022 at 6:45 AM Michał Górny <mgorny@gentoo.org> wrote:

    Signed-off-by: Michał Górny <mgorny@gentoo.org>


    Looks good to me. I noticed that this implementation takes only a
    single -b/-d/-r as the initial argument and then a list of packages.
    I'd suggested pairs of -b/-d/-r <pkg> but I think you're right not to implement that. I doubt that it's common to need to mix -b/-d/-r.


    Yeah, I think having options affect only a subset of arguments would
    be confusing at best.

    --
    Best regards,
    Michał Górny

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)