From patchwork Mon Mar 7 19:42:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 4856 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 4955BC433F5 for ; Mon, 7 Mar 2022 19:42:40 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.2516.1646682159472416139 for ; Mon, 07 Mar 2022 11:42:39 -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 9F1FF153B for ; Mon, 7 Mar 2022 11:42:38 -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 4A4963F7F5 for ; Mon, 7 Mar 2022 11:42:38 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 1/4] pip_install_wheel: don't lazy assign PIPINSTALLARGS Date: Mon, 7 Mar 2022 19:42:33 +0000 Message-Id: <20220307194236.3837684-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 ; Mon, 07 Mar 2022 19:42:40 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162860 If we expect users to extend this we should use =, as otherwise a recipe that does += will replace the default value. Signed-off-by: Ross Burton --- meta/classes/pip_install_wheel.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/pip_install_wheel.bbclass b/meta/classes/pip_install_wheel.bbclass index c1680a24ed..febcc8e445 100644 --- a/meta/classes/pip_install_wheel.bbclass +++ b/meta/classes/pip_install_wheel.bbclass @@ -10,7 +10,7 @@ PIP_INSTALL_PACKAGE ?= "${@guess_pip_install_package_name(d)}" PIP_INSTALL_DIST_PATH ?= "${@d.getVar('SETUPTOOLS_SETUP_PATH') or d.getVar('B')}/dist" PYPA_WHEEL ??= "${PIP_INSTALL_DIST_PATH}/${PIP_INSTALL_PACKAGE}-*-*.whl" -PIP_INSTALL_ARGS ?= "\ +PIP_INSTALL_ARGS = "\ -vvvv \ --ignore-installed \ --no-cache \ From patchwork Mon Mar 7 19:42:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 4857 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 2A056C4332F for ; Mon, 7 Mar 2022 19:42:41 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.2557.1646682159686214262 for ; Mon, 07 Mar 2022 11:42:40 -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 3EDD21570 for ; Mon, 7 Mar 2022 11:42:39 -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 D0B773F7F5 for ; Mon, 7 Mar 2022 11:42:38 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 2/4] python3-pip: remove obsolete and confusing comment Date: Mon, 7 Mar 2022 19:42:34 +0000 Message-Id: <20220307194236.3837684-2-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220307194236.3837684-1-ross.burton@arm.com> References: <20220307194236.3837684-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 ; Mon, 07 Mar 2022 19:42:41 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162861 This comment is very obsolete. Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3-pip_22.0.3.bb | 1 - 1 file changed, 1 deletion(-) diff --git a/meta/recipes-devtools/python/python3-pip_22.0.3.bb b/meta/recipes-devtools/python/python3-pip_22.0.3.bb index 7eb9fb69ba..8d6dfcede7 100644 --- a/meta/recipes-devtools/python/python3-pip_22.0.3.bb +++ b/meta/recipes-devtools/python/python3-pip_22.0.3.bb @@ -45,7 +45,6 @@ EOF } do_install:append() { - # Install as pip3 and leave pip2 as default if [ -e ${D}/${bindir}/pip ]; then rm ${D}/${bindir}/pip fi From patchwork Mon Mar 7 19:42:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 4858 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 27931C433EF for ; Mon, 7 Mar 2022 19:42:41 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.2486.1646682160282466637 for ; Mon, 07 Mar 2022 11:42:40 -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 C0E9A1576 for ; Mon, 7 Mar 2022 11:42:39 -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 6C4003F7F5 for ; Mon, 7 Mar 2022 11:42:39 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 3/4] flit_core: clean up configure/compile Date: Mon, 7 Mar 2022 19:42:35 +0000 Message-Id: <20220307194236.3837684-3-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220307194236.3837684-1-ross.burton@arm.com> References: <20220307194236.3837684-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 ; Mon, 07 Mar 2022 19:42:41 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162862 Make do_configure do nothing by default as the base configure isn't useful, and invoke the build API directly instead of writing a script. In the future, this can simply call python3-build. Signed-off-by: Ross Burton --- meta/classes/flit_core.bbclass | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/meta/classes/flit_core.bbclass b/meta/classes/flit_core.bbclass index 819d12457c..a7667795fe 100644 --- a/meta/classes/flit_core.bbclass +++ b/meta/classes/flit_core.bbclass @@ -3,15 +3,13 @@ inherit pip_install_wheel python3native python3-dir setuptools3-base DEPENDS += "python3 python3-flit-core-native python3-pip-native" flit_core_do_configure () { - mkdir -p ${S}/dist - cat > ${S}/build-it.py << EOF -from flit_core import buildapi -buildapi.build_wheel('./dist') -EOF + : } +# TODO: ideally this uses pypa/build flit_core_do_compile () { - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/build-it.py + mkdir -p ${S}/dist + nativepython3 -c "from flit_core import buildapi; buildapi.build_wheel('./dist')" } EXPORT_FUNCTIONS do_configure do_compile From patchwork Mon Mar 7 19:42:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 4859 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 246BDC433F5 for ; Mon, 7 Mar 2022 19:42:46 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.2487.1646682160789596743 for ; Mon, 07 Mar 2022 11:42:41 -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 53237153B for ; Mon, 7 Mar 2022 11:42:40 -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 F28BA3F7F5 for ; Mon, 7 Mar 2022 11:42:39 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 4/4] setuptools_build_meta: clean up configure/compile Date: Mon, 7 Mar 2022 19:42:36 +0000 Message-Id: <20220307194236.3837684-4-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220307194236.3837684-1-ross.burton@arm.com> References: <20220307194236.3837684-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 ; Mon, 07 Mar 2022 19:42:46 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162863 Make do_configure do nothing by default as the base configure isn't useful, and invoke the build API directly instead of writing a script. In the future, this can simply call python3-build. Signed-off-by: Ross Burton --- meta/classes/setuptools_build_meta.bbclass | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/meta/classes/setuptools_build_meta.bbclass b/meta/classes/setuptools_build_meta.bbclass index 8f5479e922..0651cca0a0 100644 --- a/meta/classes/setuptools_build_meta.bbclass +++ b/meta/classes/setuptools_build_meta.bbclass @@ -3,16 +3,13 @@ inherit pip_install_wheel setuptools3-base DEPENDS += "python3-setuptools-native python3-wheel-native" setuptools_build_meta_do_configure () { - mkdir -p ${S}/dist - cat > ${S}/build-it.py << EOF -from setuptools import build_meta -wheel = build_meta.build_wheel('./dist') -print(wheel) -EOF + : } +# TODO: ideally this uses pypa/build setuptools_build_meta_do_compile () { - nativepython3 ${S}/build-it.py + mkdir -p ${S}/dist + nativepython3 -c "from setuptools import build_meta; build_meta.build_wheel('./dist')" } EXPORT_FUNCTIONS do_configure do_compile