Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: Ross Burton <ross@burtonini.com>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: RE: [OE-core] [PATCH 2/3] setuptools3.bbclass: clean up
Date: Fri, 4 Mar 2022 19:03:37 +0000	[thread overview]
Message-ID: <7914aeb052c84f0895246df5f8a7e440@axis.com> (raw)
In-Reply-To: <20220304171408.2672507-2-ross.burton@arm.com>

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Ross Burton
> Sent: den 4 mars 2022 18:14
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 2/3] setuptools3.bbclass: clean up
> 
> There's been a lot of work in this class lately, so a little spring
> cleaning is needed.
> 
> Create wheels verbosely to help debug problems.
> 
> Remove unused SETUPTOOLS_INSTALL_ARGS, these can't be passed to
> bdist_wheel.
> 
> Remove duplicate manipulation of files in bindir as pip_install_wheel
> does the same.
> 
> Remove obsolete deletion of easy-install.pth, wheels don't generate that.
> 
> Remove obsolete ${datadir}/share fixup, pip-installed wheels can't
> generate that path combination.
> 
> Remove purging of ${D} references from *.py, these won't be written by
> standard setuptools, and recipes can do it themselves to work around
> specific issues if needed.
> 
> Remove obsolete vardepsexclude of MACHINE on do_install, as that variable
> isn't referenced.
> 
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> 
> fixup! setuptools3.bbclass: clean up

That last line looks like some leftover from rebasing?

> ---
>  meta/classes/setuptools3.bbclass | 34 +-------------------------------
>  1 file changed, 1 insertion(+), 33 deletions(-)
> 
> diff --git a/meta/classes/setuptools3.bbclass
> b/meta/classes/setuptools3.bbclass
> index 564996c556..1b1a8aac76 100644
> --- a/meta/classes/setuptools3.bbclass
> +++ b/meta/classes/setuptools3.bbclass
> @@ -4,13 +4,6 @@ inherit setuptools3-base pip_install_wheel
>  #B = "${WORKDIR}/build"
> 
>  SETUPTOOLS_BUILD_ARGS ?= ""
> -SETUPTOOLS_INSTALL_ARGS ?= "--root=${D} \
> -    --prefix=${prefix} \
> -    --install-lib=${PYTHON_SITEPACKAGES_DIR} \
> -    --install-data=${datadir}"
> -
> -SETUPTOOLS_PYTHON = "python3"
> -SETUPTOOLS_PYTHON:class-native = "nativepython3"
> 
>  SETUPTOOLS_SETUP_PATH ?= "${S}"
> 
> @@ -24,42 +17,17 @@ setuptools3_do_compile() {
>          STAGING_INCDIR=${STAGING_INCDIR} \
>          STAGING_LIBDIR=${STAGING_LIBDIR} \
>          ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \
> -        bdist_wheel ${SETUPTOOLS_BUILD_ARGS} || \
> +        bdist_wheel --verbose ${SETUPTOOLS_BUILD_ARGS} || \
>          bbfatal_log "'${PYTHON_PN} setup.py bdist_wheel ${SETUPTOOLS_BUILD_ARGS}' execution failed."

Why all the backslashes? This is bitbake, not make. ;)

>  }
>  setuptools3_do_compile[vardepsexclude] = "MACHINE"
>  do_compile[cleandirs] += "${SETUPTOOLS_SETUP_PATH}/dist"
> 
>  setuptools3_do_install() {
> -        cd ${SETUPTOOLS_SETUP_PATH}
> -
>          pip_install_wheel_do_install
> -
> -        # support filenames with *spaces*
> -        find ${D} -name "*.py" -exec grep -q ${D} {} \; \
> -                               -exec sed -i -e s:${D}::g {} \;
> -
> -        for i in ${D}${bindir}/* ${D}${sbindir}/*; do
> -            if [ -f "$i" ]; then
> -                sed -i -e s:${PYTHON}:${USRBINPATH}/env\ ${SETUPTOOLS_PYTHON}:g $i
> -                sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
> -            fi
> -        done
> -
> -        rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth
> -
> -        #
> -        # FIXME: Bandaid against wrong datadir computation
> -        #
> -        if [ -e ${D}${datadir}/share ]; then
> -            mv -f ${D}${datadir}/share/* ${D}${datadir}/
> -            rmdir ${D}${datadir}/share
> -        fi
>  }
> -setuptools3_do_install[vardepsexclude] = "MACHINE"
> 
>  EXPORT_FUNCTIONS do_configure do_compile do_install
> 
>  export LDSHARED="${CCLD} -shared"
>  DEPENDS += "python3-setuptools-native python3-wheel-native"
> -
> --
> 2.25.1

//Peter



  reply	other threads:[~2022-03-04 19:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-04 17:14 [PATCH 1/3] asciidoc: update git repository Ross Burton
2022-03-04 17:14 ` [PATCH 2/3] setuptools3.bbclass: clean up Ross Burton
2022-03-04 19:03   ` Peter Kjellerstedt [this message]
2022-03-04 17:14 ` [PATCH 3/3] pip_install_wheel: " Ross Burton
2022-03-05  1:57   ` [OE-core] " Khem Raj
2022-03-07 14:09     ` Ross Burton
2022-03-05  8:22   ` Richard Purdie
2022-03-05 11:05     ` Ross Burton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7914aeb052c84f0895246df5f8a7e440@axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ross@burtonini.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox