• [gentoo-dev] [PATCH 0/8] Next Python eclass batch (incl. PyPy slots and

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Fri Nov 22 14:50:01 2024
    Hi,

    Part of this has been sent as part of the original PyPy slotting
    proposal, the rest are extra "non-urgent" changes and cleanups.

    This will be pushed sometime between new pkgcheck release (which is
    required to avoid tons of false positives) and next PyPy slot/subslot.

    The primary change is replacing dev-python/pypy3:= compatibility package
    dep with the new dev-lang/pypy:=[symlink] dep. The idea is that when we
    get a new slot/subslot, the existing := dep will trigger rebuilds
    and the packages will therefore be rebuilt with the new dependency.
    Some time after that, we'll be able to lastrite dev-python/pypy3.

    Other changes are:

    - fixing python_gen_any_dep with PYTHON_REQ_USE (the bug doesn't trigger
    right now)

    - moving python3_13t earlier in impl list, so that the experimental impl
    doesn't get used for common phases

    - updating for newer maturin versions

    - disabling trove-classifier validation that can cause pointless build
    failures if users have too old dev-python/trove-classifiers installed


    Ionen Wolkens (1):
    distutils-r1.eclass: Update maturin's skip auditwheel option

    Michał Górny (7):
    python-any-r1.eclass: Fix python_gen_any_dep w/ PYTHON_REQ_USE
    python-any-r1.eclass: Remove obsolete variable
    python-utils-r1.eclass: Depend on dev-lang/pypy directly
    python-utils-r1.eclass: Move python3_13t before other python*
    distutils-r1.eclass: Use HATCH_METADATA_CLASSIFIERS_NO_VERIFY
    distutils-r1.eclass: Also do SETUPTOOLS_RUST_CARGO_PROFILE uncond.
    distutils-r1.eclass: Disable setuptools trove-classifier validation

    eclass/distutils-r1.eclass | 15 ++++++++++-----
    eclass/python-any-r1.eclass | 5 ++---
    eclass/python-utils-r1.eclass | 11 +++--------
    eclass/tests/python-utils-r1.sh | 4 +++-
    4 files changed, 18 insertions(+), 17 deletions(-)

    --
    2.47.0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Fri Nov 22 14:50:01 2024
    From: Ionen Wolkens <ionen@gentoo.org>

    =maturin-1.7.1 has deprecated --skip-auditwheel and added --auditwheel=<check|repair|skip> to replace it. Update and set
    the lower bound to latest stable rather than use has_version.

    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/39204
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/distutils-r1.eclass | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
    index 7ab8dcae3265..7e65bcb964a1 100644
    --- a/eclass/distutils-r1.eclass
    +++ b/eclass/distutils-r1.eclass
    @@ -271,7 +271,7 @@ _distutils_set_globals() {
    ;;
    maturin)
    bdep+='
    - >=dev-util/maturin-1.4.0[${PYTHON_USEDEP}]
    + >=dev-util/maturin-1.7.4[${PYTHON_USEDEP}]
    '
    ;;
    no)
    @@ -1262,8 +1262,8 @@ distutils_pep517_install() {
    # `maturin pep517 build-wheel --help` for options
    local maturin_args=(
    "${DISTUTILS_ARGS[@]}"
    + --auditwheel=skip # see bug #831171
    --jobs="$(makeopts_jobs)"
    - --skip-auditwheel # see bug #831171
    $(in_iuse debug && usex debug '--profile=dev' '')
    )

    --
    2.47.0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Fri Nov 22 14:50:01 2024
    Remove a leftover variable from before PYTHON_PKG_DEP was used.

    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/python-any-r1.eclass | 3 +--
    1 file changed, 1 insertion(+), 2 deletions(-)

    diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
    index ca2ddf146406..adc7b1bfec47 100644
    --- a/eclass/python-any-r1.eclass
    +++ b/eclass/python-any-r1.eclass
    @@ -167,8 +167,7 @@ inherit python-utils-r1
    # @CODE

    _python_any_set_globals() {
    - local usestr deps i PYTHON_PKG_DEP
    - [[ ${PYTHON_REQ_USE} ]] && usestr="[${PYTHON_REQ_USE}]"
    + local deps i PYTHON_PKG_DEP

    _python_set_impls

    --
    2.47.0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Fri Nov 22 14:50:01 2024
    Move the python3_13t target on the list before other CPython targets.
    This means it's technically "less preferred", so e.g. *all phases
    would rather be performed with regular CPython, which should generally
    be more faster.

    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/python-utils-r1.eclass | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 1c0e63a2621f..0cb132b72e3a 100644
    --- a/eclass/python-utils-r1.eclass
    +++ b/eclass/python-utils-r1.eclass
    @@ -40,8 +40,8 @@ inherit multiprocessing toolchain-funcs
    # All supported Python implementations, most preferred last.
    _PYTHON_ALL_IMPLS=(
    pypy3
    - python3_{10..13}
    python3_13t
    + python3_{10..13}
    )
    readonly _PYTHON_ALL_IMPLS

    --
    2.47.0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Fri Nov 22 14:50:01 2024
    Fix `python_gen_any_dep()` to correctly strip the `:=` operator when
    it does not occur at the end of `PYTHON_PKG_DEP`, i.e. when
    `PYTHON_REQ_USE` is used and a USE dependency string is appended.

    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/python-any-r1.eclass | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
    index 0c01a49f9000..ca2ddf146406 100644
    --- a/eclass/python-any-r1.eclass
    +++ b/eclass/python-any-r1.eclass
    @@ -259,7 +259,7 @@ python_gen_any_dep() {
    local i_depstr=${depstr//\$\{PYTHON_USEDEP\}/${PYTHON_USEDEP}}
    i_depstr=${i_depstr//\$\{PYTHON_SINGLE_USEDEP\}/${PYTHON_SINGLE_USEDEP}}
    # note: need to strip '=' slot operator for || deps
    - out="( ${PYTHON_PKG_DEP%:=} ${i_depstr} ) ${out}"
    + out="( ${PYTHON_PKG_DEP/:=} ${i_depstr} ) ${out}"
    done
    echo "|| ( ${out})"
    }
    --
    2.47.0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Fri Nov 22 14:50:01 2024
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/distutils-r1.eclass | 6 +++---
    1 file changed, 3 insertions(+), 3 deletions(-)

    diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
    index 51bf005271c1..de54b17fa9b3 100644
    --- a/eclass/distutils-r1.eclass
    +++ b/eclass/distutils-r1.eclass
    @@ -1259,6 +1259,9 @@ distutils_pep517_install() {

    # set it globally in case we were using "standalone" wrapper
    local -x HATCH_METADATA_CLASSIFIERS_NO_VERIFY=1
    + if in_iuse debug && use debug; then
    + local -x SETUPTOOLS_RUST_CARGO_PROFILE=dev
    + fi

    case ${DISTUTILS_USE_PEP517} in
    maturin)
    @@ -1351,9 +1354,6 @@ distutils_pep517_install() {
    )
    ;;
    setuptools)
    - if in_iuse debug && use debug; then
    - local -x SETUPTOOLS_RUST_CARGO_PROFILE=dev
    - fi
    if [[ -n ${DISTUTILS_ARGS[@]} ]]; then
    config_settings=$(
    "${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die
    --
    2.47.0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Fri Nov 22 14:50:01 2024
    Depend on `>=dev-lang/pypy-3.10:=` rather than the backwards
    compatibility `dev-python/pypy3` package. Note that the package needs
    to remain at least for some time after the next subslot bump, so that
    users rebuild all packages and get the updated dependency across
    the system.

    Note that this requires pkgcheck to be updated first.

    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/python-utils-r1.eclass | 9 ++-------
    eclass/tests/python-utils-r1.sh | 4 +++-
    2 files changed, 5 insertions(+), 8 deletions(-)

    diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 555b6c561a18..1c0e63a2621f 100644
    --- a/eclass/python-utils-r1.eclass
    +++ b/eclass/python-utils-r1.eclass
    @@ -450,20 +450,15 @@ _python_export() {
    local d
    case ${impl} in
    python*)
    - PYTHON_PKG_DEP="dev-lang/python:${impl#python}"
    + PYTHON_PKG_DEP="dev-lang/python:${impl#python}${PYTHON_REQ_USE:+[${PYTHON_REQ_USE}]}"
    ;;
    pypy3)
    - PYTHON_PKG_DEP="dev-python/${impl}:="
    + PYTHON_PKG_DEP=">=dev-lang/pypy-3.10:=[symlink${PYTHON_REQ_USE:+,${PYTHON_REQ_USE}}]"
    ;;
    *)
    die "Invalid implementation: ${impl}"
    esac

    - # use-dep
    - if [[ ${PYTHON_REQ_USE} ]]; then
    - PYTHON_PKG_DEP+=[${PYTHON_REQ_USE}]
    - fi
    -
    export PYTHON_PKG_DEP
    debug-print "${FUNCNAME}: PYTHON_PKG_DEP = ${PYTHON_