• [gentoo-dev] [PATCH 5/5 v3] distutils-r1.eclass: Use cargo_env when app

    From James Le Cuirot@21:1/5 to All on Thu Jul 25 13:30:02 2024
    cargo_env handles linker flags and enables cross-compiling. It also
    handles LTO filtering, so we can remove that from this eclass.

    Signed-off-by: James Le Cuirot <chewi@gentoo.org>
    ---
    eclass/distutils-r1.eclass | 16 ++++------------
    1 file changed, 4 insertions(+), 12 deletions(-)

    diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
    index fa8edb5cdfb77..743242b2acee8 100644
    --- a/eclass/distutils-r1.eclass
    +++ b/eclass/distutils-r1.eclass
    @@ -1251,7 +1251,9 @@ distutils_pep517_install() {
    die "mydistutilsargs are banned in PEP517 mode (use DISTUTILS_ARGS)"
    fi

    - local config_settings=
    + local cmd=() config_settings=
    + has cargo ${INHERITED} && cmd+=( cargo_env )
    +
    case ${DISTUTILS_USE_PEP517} in
    maturin)
    # `maturin pep517 build-wheel --help` for options
    @@ -1390,7 +1392,7 @@ distutils_pep517_install() {

    local build_backend=$(_distutils-r1_get_backend)
    einfo " Building the wheel for ${PWD#${WORKDIR}/} via ${build_backend}"
    - local cmd=(
    + cmd+=(
    "${EPYTHON}" -m gpep517 build-wheel
    --prefix="${EPREFIX}/usr"
    --backend "${build_backend}"
    @@ -1792,16 +1794,6 @@ distutils-r1_run_phase() {
    # bug fixes from Cytho