From patchwork Fri Mar 4 17:14:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 4697 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A1E3C433FE for ; Fri, 4 Mar 2022 17:14:14 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.1051.1646414053412406383 for ; Fri, 04 Mar 2022 09:14:14 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5BDDD1424 for ; Fri, 4 Mar 2022 09:14:12 -0800 (PST) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 051FD3F7B4 for ; Fri, 4 Mar 2022 09:14:11 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 1/3] asciidoc: update git repository Date: Fri, 4 Mar 2022 17:14:06 +0000 Message-Id: <20220304171408.2672507-1-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 04 Mar 2022 17:14:14 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162744 The asciidoc-py3 repository has been renamed to asciidoc-py. Signed-off-by: Ross Burton --- meta/recipes-extended/asciidoc/asciidoc_10.1.3.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-extended/asciidoc/asciidoc_10.1.3.bb b/meta/recipes-extended/asciidoc/asciidoc_10.1.3.bb index 34bf2550f5..fc8cbc89c8 100644 --- a/meta/recipes-extended/asciidoc/asciidoc_10.1.3.bb +++ b/meta/recipes-extended/asciidoc/asciidoc_10.1.3.bb @@ -8,7 +8,7 @@ LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=4e5d1baf6f20559e3bec172226a47e4e \ file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263 " -SRC_URI = "git://github.com/asciidoc/asciidoc-py3;protocol=https;branch=main" +SRC_URI = "git://github.com/asciidoc/asciidoc-py;protocol=https;branch=main" SRCREV = "342639edbbc0dcc64354a0291d2214d4d5e65cab" DEPENDS = "libxml2-native libxslt-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" From patchwork Fri Mar 4 17:14:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 4698 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A1B9C433F5 for ; Fri, 4 Mar 2022 17:14:14 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.1053.1646414053899465869 for ; Fri, 04 Mar 2022 09:14:14 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DFDB314BF for ; Fri, 4 Mar 2022 09:14:12 -0800 (PST) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8B9103F73D for ; Fri, 4 Mar 2022 09:14:12 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 2/3] setuptools3.bbclass: clean up Date: Fri, 4 Mar 2022 17:14:07 +0000 Message-Id: <20220304171408.2672507-2-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220304171408.2672507-1-ross.burton@arm.com> References: <20220304171408.2672507-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 04 Mar 2022 17:14:14 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162745 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 fixup! setuptools3.bbclass: clean up --- 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." } 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" - From patchwork Fri Mar 4 17:14:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 4699 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73EABC4332F for ; Fri, 4 Mar 2022 17:14:15 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.1065.1646414054619471857 for ; Fri, 04 Mar 2022 09:14:14 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 720901509 for ; Fri, 4 Mar 2022 09:14:13 -0800 (PST) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1DD853F73D for ; Fri, 4 Mar 2022 09:14:13 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 3/3] pip_install_wheel: clean up Date: Fri, 4 Mar 2022 17:14:08 +0000 Message-Id: <20220304171408.2672507-3-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220304171408.2672507-1-ross.burton@arm.com> References: <20220304171408.2672507-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 04 Mar 2022 17:14:15 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162746 There's been a lot of work in this class lately, so a little spring cleaning is needed. Remove redundant creation of PYTHON_SITEPACKAGES_DIR, pip will do that. Remove redundant export of PYPA_WHEEL. Simplyify recompile code using "realpath --relative-to". Signed-off-by: Ross Burton --- meta/classes/pip_install_wheel.bbclass | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/meta/classes/pip_install_wheel.bbclass b/meta/classes/pip_install_wheel.bbclass index 3beff685bb..1870b916fe 100644 --- a/meta/classes/pip_install_wheel.bbclass +++ b/meta/classes/pip_install_wheel.bbclass @@ -20,29 +20,20 @@ PIP_INSTALL_ARGS ?= "\ --prefix=${prefix} \ " -pip_install_wheel_do_install:prepend () { - install -d ${D}${PYTHON_SITEPACKAGES_DIR} -} - -export PYPA_WHEEL - PIP_INSTALL_PYTHON = "python3" PIP_INSTALL_PYTHON:class-native = "nativepython3" pip_install_wheel_do_install () { nativepython3 -m pip install ${PIP_INSTALL_ARGS} ${PYPA_WHEEL} || - bbfatal_log "Failed to pip install wheel. Check the logs." + bbfatal_log "Failed to pip install wheel. Check the logs." + cd ${D} for i in ${D}${bindir}/* ${D}${sbindir}/*; do if [ -f "$i" ]; then sed -i -e "1s,#!.*nativepython3,#!${USRBINPATH}/env ${PIP_INSTALL_PYTHON}," $i sed -i -e "s:${PYTHON}:${USRBINPATH}/env\ ${PIP_INSTALL_PYTHON}:g" $i sed -i -e "s:${STAGING_BINDIR_NATIVE}:${bindir}:g" $i - # Recompile after modifying it - cd ${D} - file=`echo $i | sed 's:^${D}/::'` - ${STAGING_BINDIR_NATIVE}/python3-native/python3 -c "from py_compile import compile; compile('$file')" - cd - + nativepython3 -mpy_compile $(realpath --relative-to=${D} $i) fi done }