• [gentoo-dev] [PATCH 07/18] distutils-r1.eclass: Move venv/merge-root lo

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Sat Jun 4 11:10:01 2022
    Move the PEP517 venv logic, install executable wrapping and root-merging
    logic all into post-phases. This will enable the ebuilds that do not
    use the standard phase implementations to use them.

    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/distutils-r1.eclass | 124 ++++++++++++++++++++++---------------
    1 file changed, 73 insertions(+), 51 deletions(-)

    diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
    index 1d7bea6d8cab..208bd2718cb8 100644
    --- a/eclass/distutils-r1.eclass
    +++ b/eclass/distutils-r1.eclass
    @@ -1361,33 +1361,7 @@ distutils-r1_python_compile() {
    addpredict /usr/lib/portage/pym
    addpredict /usr/local # bug 498232

    - local root=${BUILD_DIR}/install
    - distutils_pep517_install "${root}"
    -
    - # copy executables to python-exec directory
    - # we do it early so that we can alter bindir recklessly
    - local bindir=${root}${EPREFIX}/usr/bin
    - local rscriptdir=${root}$(python_get_scriptdir)
    - [[ -d ${rscriptdir} ]] &&
    - die "${rscriptdir} should not exist!"
    - if [[ -d ${bindir} ]]; then
    - mkdir -p "${rscriptdir}" || die
    - cp -a --reflink=auto "${bindir}"/. "${rscriptdir}"/ || die
    - fi
    -
    - # enable venv magic inside the install tree
    - mkdir -p "${bindir}" || die
    -