From patchwork Wed Jul 13 16:28:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 10128 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 83BD3CCA479 for ; Wed, 13 Jul 2022 16:28:27 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.24017.1657729704280941599 for ; Wed, 13 Jul 2022 09:28:24 -0700 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 4C03F15A1; Wed, 13 Jul 2022 09:28:24 -0700 (PDT) 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 672933F792; Wed, 13 Jul 2022 09:28:23 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 1/8] python3-setuptools-scm: add missing python3-typing-extensions dependency Date: Wed, 13 Jul 2022 17:28:14 +0100 Message-Id: <20220713162821.974801-1-ross.burton@arm.com> X-Mailer: git-send-email 2.34.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 ; Wed, 13 Jul 2022 16:28:27 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/167966 Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3-setuptools-scm_7.0.3.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-devtools/python/python3-setuptools-scm_7.0.3.bb b/meta/recipes-devtools/python/python3-setuptools-scm_7.0.3.bb index 114e6820a9b..72529353e58 100644 --- a/meta/recipes-devtools/python/python3-setuptools-scm_7.0.3.bb +++ b/meta/recipes-devtools/python/python3-setuptools-scm_7.0.3.bb @@ -11,7 +11,7 @@ inherit pypi python_setuptools_build_meta UPSTREAM_CHECK_REGEX = "setuptools_scm-(?P.*)\.tar" -DEPENDS += "python3-tomli-native python3-packaging-native" +DEPENDS += "python3-tomli-native python3-packaging-native python3-typing-extensions-native" RDEPENDS:${PN} = "\ ${PYTHON_PN}-packaging \ From patchwork Wed Jul 13 16:28:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 10130 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 92896CCA481 for ; Wed, 13 Jul 2022 16:28:27 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.24133.1657729705100478754 for ; Wed, 13 Jul 2022 09:28:25 -0700 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 159561C01; Wed, 13 Jul 2022 09:28:25 -0700 (PDT) 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 148513F792; Wed, 13 Jul 2022 09:28:23 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 2/8] python3-flit-core: bootstrap explicitly Date: Wed, 13 Jul 2022 17:28:15 +0100 Message-Id: <20220713162821.974801-2-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220713162821.974801-1-ross.burton@arm.com> References: <20220713162821.974801-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 ; Wed, 13 Jul 2022 16:28:27 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/167967 Add a method to python_flit_core.bbclass that does a manual build with flit explicitly, and use that to bootstrap python3-flit-core-native which can build itself. Signed-off-by: Ross Burton --- meta/classes/python_flit_core.bbclass | 5 +++++ meta/recipes-devtools/python/python3-flit-core_3.7.1.bb | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/meta/classes/python_flit_core.bbclass b/meta/classes/python_flit_core.bbclass index 96652aa2043..a900f7b5579 100644 --- a/meta/classes/python_flit_core.bbclass +++ b/meta/classes/python_flit_core.bbclass @@ -3,3 +3,8 @@ inherit python_pep517 python3native python3-dir setuptools3-base DEPENDS += "python3 python3-flit-core-native" PEP517_BUILD_API = "flit_core.buildapi" + +python_flit_core_do_manual_build () { + cd ${PEP517_SOURCE_PATH} + nativepython3 -m flit_core.wheel --outdir ${PEP517_WHEEL_PATH} . +} diff --git a/meta/recipes-devtools/python/python3-flit-core_3.7.1.bb b/meta/recipes-devtools/python/python3-flit-core_3.7.1.bb index 8d107384a6d..abe620374c0 100644 --- a/meta/recipes-devtools/python/python3-flit-core_3.7.1.bb +++ b/meta/recipes-devtools/python/python3-flit-core_3.7.1.bb @@ -20,6 +20,10 @@ DEPENDS:append:class-native = " unzip-native" PYPI_PACKAGE = "flit" PEP517_SOURCE_PATH = "${S}/flit_core" +do_compile:class-native () { + python_flit_core_do_manual_build +} + do_install:class-native () { python_pep517_do_bootstrap_install } From patchwork Wed Jul 13 16:28:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 10126 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 848E8C3F2D4 for ; Wed, 13 Jul 2022 16:28:27 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.24148.1657729705921519151 for ; Wed, 13 Jul 2022 09:28:26 -0700 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 061B415A1; Wed, 13 Jul 2022 09:28:26 -0700 (PDT) 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 ED3B73F792; Wed, 13 Jul 2022 09:28:24 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 3/8] python3-installer: bootstrap by installing installer with installer Date: Wed, 13 Jul 2022 17:28:16 +0100 Message-Id: <20220713162821.974801-3-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220713162821.974801-1-ross.burton@arm.com> References: <20220713162821.974801-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 ; Wed, 13 Jul 2022 16:28:27 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/167968 The installer can install itself by simply adding src/ to PYTHONPATH. As this previously used unzip, we need to disable bytecode as otherwise the newly packaged .pyc files conflict with the any generated .pyc files in the sysroot. Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3-installer_0.5.1.bb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/meta/recipes-devtools/python/python3-installer_0.5.1.bb b/meta/recipes-devtools/python/python3-installer_0.5.1.bb index f4f9e1bde64..b7780702d6b 100644 --- a/meta/recipes-devtools/python/python3-installer_0.5.1.bb +++ b/meta/recipes-devtools/python/python3-installer_0.5.1.bb @@ -12,11 +12,13 @@ SRC_URI[sha256sum] = "f970995ec2bb815e2fdaf7977b26b2091e1e386f0f42eafd5ac811953d inherit pypi python_flit_core +# Bootstrap the native install by installing with ourself DEPENDS:remove:class-native = "python3-installer-native" -DEPENDS:append:class-native = " unzip-native" -do_install:class-native () { - python_pep517_do_bootstrap_install +INSTALL_WHEEL_COMPILE_BYTECODE:class-native = "--no-compile-bytecode" + +do_install:prepend:class-native() { + export PYTHONPATH="${S}/src" } BBCLASSEXTEND = "native nativesdk" From patchwork Wed Jul 13 16:28:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 10127 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 83B5EC43334 for ; Wed, 13 Jul 2022 16:28:27 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.24149.1657729706659027437 for ; Wed, 13 Jul 2022 09:28:26 -0700 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 B3AD01C01; Wed, 13 Jul 2022 09:28:26 -0700 (PDT) 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 C42A43F792; Wed, 13 Jul 2022 09:28:25 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 4/8] python3-picobuild: add new recipe Date: Wed, 13 Jul 2022 17:28:17 +0100 Message-Id: <20220713162821.974801-4-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220713162821.974801-1-ross.burton@arm.com> References: <20220713162821.974801-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 ; Wed, 13 Jul 2022 16:28:27 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/167969 Picobuild is a pico-scale Python PEP517 build frontend, designed to have minimal dependencies (via vendoring) to be well suited for building source-based distributions, such as OpenEmbedded. Signed-off-by: Ross Burton --- meta/conf/distro/include/maintainers.inc | 1 + .../python/python3-picobuild_0.1.bb | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-picobuild_0.1.bb diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index a69af3d7805..ac1a1ea1a79 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -638,6 +638,7 @@ RECIPE_MAINTAINER:pn-python3-packaging = "Tim Orling " RECIPE_MAINTAINER:pn-python3-pathlib2 = "Tim Orling " RECIPE_MAINTAINER:pn-python3-pathspec = "Ross Burton " RECIPE_MAINTAINER:pn-python3-pbr = "Zang Ruochen " +RECIPE_MAINTAINER:pn-python3-picobuild = "Ross Burton " RECIPE_MAINTAINER:pn-python3-pip = "Zang Ruochen " RECIPE_MAINTAINER:pn-python3-pluggy = "Tim Orling " RECIPE_MAINTAINER:pn-python3-ply = "Tim Orling " diff --git a/meta/recipes-devtools/python/python3-picobuild_0.1.bb b/meta/recipes-devtools/python/python3-picobuild_0.1.bb new file mode 100644 index 00000000000..7555d97f91a --- /dev/null +++ b/meta/recipes-devtools/python/python3-picobuild_0.1.bb @@ -0,0 +1,21 @@ +SUMMARY = "Library and tool for installing Python wheels" +HOMEPAGE = "https://gitlab.com/rossburton/picobuild" +LICENSE = "MIT & ( Apache-2.0 | BSD-2-Clause)" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=6c811a9fbdf5641ff0b0d43fbbb440e5 \ + file://picobuild/vendored/packaging/LICENSE.APACHE;md5=2ee41112a44fe7014dce33e26468ba93 \ + file://picobuild/vendored/packaging/LICENSE.BSD;md5=7bef9bf4a8e4263634d0597e7ba100b8 \ + file://picobuild/vendored/pep517/LICENSE;md5=aad69c93f605003e3342b174d9b0708c \ + file://picobuild/vendored/pyparsing/LICENSE;md5=657a566233888513e1f07ba13e2f47f1 \ + file://picobuild/vendored/tomli/LICENSE;md5=aaaaf0879d17df0110d1aa8c8c9f46f5 \ + " + +SRC_URI = "git://gitlab.com/rossburton/picobuild.git;protocol=https;branch=main" +SRCREV = "3441d5500a5ad23a44027576cf5261c3b7c1d6b0" +PV .= "+git${SRCPV}" + +S = "${WORKDIR}/git" + +inherit python_flit_core + +BBCLASSEXTEND = "native nativesdk" From patchwork Wed Jul 13 16:28:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 10129 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 AE911CCA483 for ; Wed, 13 Jul 2022 16:28:28 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.24283.1657729707245133969 for ; Wed, 13 Jul 2022 09:28:27 -0700 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 60B611C0A; Wed, 13 Jul 2022 09:28:27 -0700 (PDT) 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 7DADF3F792; Wed, 13 Jul 2022 09:28:26 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 5/8] python_pep517: use picobuild instead of manually calling the API Date: Wed, 13 Jul 2022 17:28:18 +0100 Message-Id: <20220713162821.974801-5-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220713162821.974801-1-ross.burton@arm.com> References: <20220713162821.974801-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 ; Wed, 13 Jul 2022 16:28:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/167970 Calling the PEP-517 API directly mostly works, but sometimes doesn't. For example we don't verify build dependencies, which led to the cbor2 ugprade silently failing to actually package anything. The standard frontend is pypa/build, but for source-based distributions that can be annoying to build as it depends on the following packages: - tomli - pep517 - packaging - pyparsing Manually bootstrapping those recipes is possible, but tedious. Picobuild is another frontend (written by myself) which is designed explicitly to be used programatically by source-based distributions: it doesn't support builds inside virtual environments as we're building distribution packages, and it vendors the dependencies for bootstrapping if they're not available. Over time more packages are expected to move to using Flit to build which makes the bootstrapping process slightly easier, and tomli will be integrated into Python 3.11, so it's possible that in the future we drop picobuild and switch to build. This change means the PEP517_BUILD_API variable is obsolete, so remove it. Signed-off-by: Ross Burton --- meta/classes/python_pep517.bbclass | 10 ++++------ .../recipes-devtools/python/python3-flit-core_3.7.1.bb | 2 +- .../recipes-devtools/python/python3-installer_0.5.1.bb | 8 ++++++-- meta/recipes-devtools/python/python3-picobuild_0.1.bb | 2 ++ 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/meta/classes/python_pep517.bbclass b/meta/classes/python_pep517.bbclass index 34ffdc9c0db..7cdb9c8f9df 100644 --- a/meta/classes/python_pep517.bbclass +++ b/meta/classes/python_pep517.bbclass @@ -4,17 +4,16 @@ # This class will build a wheel in do_compile, and use pypa/installer to install # it in do_install. -DEPENDS:append = " python3-installer-native" +DEPENDS:append = " python3-picobuild-native python3-installer-native" # Where to execute the build process from PEP517_SOURCE_PATH ?= "${S}" -# The PEP517 build API entry point -PEP517_BUILD_API ?= "unset" - # The directory where wheels will be written PEP517_WHEEL_PATH ?= "${WORKDIR}/dist" +PEP517_PICOBUILD_OPTS ?= "" + # The interpreter to use for installed scripts PEP517_INSTALL_PYTHON = "python3" PEP517_INSTALL_PYTHON:class-native = "nativepython3" @@ -31,8 +30,7 @@ python_pep517_do_configure () { # When we have Python 3.11 we can parse pyproject.toml to determine the build # API entry point directly python_pep517_do_compile () { - cd ${PEP517_SOURCE_PATH} - nativepython3 -c "import ${PEP517_BUILD_API} as api; api.build_wheel('${PEP517_WHEEL_PATH}')" + nativepython3 -m picobuild --source ${PEP517_SOURCE_PATH} --dest ${PEP517_WHEEL_PATH} --wheel ${PEP517_PICOBUILD_OPTS} } do_compile[cleandirs] += "${PEP517_WHEEL_PATH}" diff --git a/meta/recipes-devtools/python/python3-flit-core_3.7.1.bb b/meta/recipes-devtools/python/python3-flit-core_3.7.1.bb index abe620374c0..fe6b16ac540 100644 --- a/meta/recipes-devtools/python/python3-flit-core_3.7.1.bb +++ b/meta/recipes-devtools/python/python3-flit-core_3.7.1.bb @@ -13,7 +13,7 @@ SRC_URI[sha256sum] = "3c9bd9c140515bfe62dd938c6610d10d6efb9e35cc647fc614fe5fb3a5 inherit pypi python_flit_core # Need to install by hand as there's a dependency loop -DEPENDS:remove:class-native = " python3-installer-native" +DEPENDS:remove:class-native = " python3-picobuild-native python3-installer-native" DEPENDS:append:class-native = " unzip-native" # We need the full flit tarball diff --git a/meta/recipes-devtools/python/python3-installer_0.5.1.bb b/meta/recipes-devtools/python/python3-installer_0.5.1.bb index b7780702d6b..07bbafa81fb 100644 --- a/meta/recipes-devtools/python/python3-installer_0.5.1.bb +++ b/meta/recipes-devtools/python/python3-installer_0.5.1.bb @@ -12,11 +12,15 @@ SRC_URI[sha256sum] = "f970995ec2bb815e2fdaf7977b26b2091e1e386f0f42eafd5ac811953d inherit pypi python_flit_core -# Bootstrap the native install by installing with ourself -DEPENDS:remove:class-native = "python3-installer-native" +# Bootstrap the native build +DEPENDS:remove:class-native = "python3-picobuild-native python3-installer-native" INSTALL_WHEEL_COMPILE_BYTECODE:class-native = "--no-compile-bytecode" +do_compile:class-native () { + python_flit_core_do_manual_build +} + do_install:prepend:class-native() { export PYTHONPATH="${S}/src" } diff --git a/meta/recipes-devtools/python/python3-picobuild_0.1.bb b/meta/recipes-devtools/python/python3-picobuild_0.1.bb index 7555d97f91a..3c92b079f39 100644 --- a/meta/recipes-devtools/python/python3-picobuild_0.1.bb +++ b/meta/recipes-devtools/python/python3-picobuild_0.1.bb @@ -18,4 +18,6 @@ S = "${WORKDIR}/git" inherit python_flit_core +DEPENDS:remove:class-native = "python3-picobuild-native" + BBCLASSEXTEND = "native nativesdk" From patchwork Wed Jul 13 16:28:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 10133 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 9B7AAC43334 for ; Wed, 13 Jul 2022 16:38:18 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.101.1657730288456063919 for ; Wed, 13 Jul 2022 09:38:08 -0700 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 0D9EE1C14; Wed, 13 Jul 2022 09:28:28 -0700 (PDT) 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 2A8113F792; Wed, 13 Jul 2022 09:28:27 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 6/8] classes: remove obsolete PEP517_BUILD_API Date: Wed, 13 Jul 2022 17:28:19 +0100 Message-Id: <20220713162821.974801-6-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220713162821.974801-1-ross.burton@arm.com> References: <20220713162821.974801-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 ; Wed, 13 Jul 2022 16:38:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/167974 This variable is no longer used, so remove it from the python_* classes. Signed-off-by: Ross Burton --- meta/classes/python_flit_core.bbclass | 2 -- meta/classes/python_hatchling.bbclass | 2 -- meta/classes/python_poetry_core.bbclass | 2 -- meta/classes/python_setuptools_build_meta.bbclass | 2 -- 4 files changed, 8 deletions(-) diff --git a/meta/classes/python_flit_core.bbclass b/meta/classes/python_flit_core.bbclass index a900f7b5579..7109307de5b 100644 --- a/meta/classes/python_flit_core.bbclass +++ b/meta/classes/python_flit_core.bbclass @@ -2,8 +2,6 @@ inherit python_pep517 python3native python3-dir setuptools3-base DEPENDS += "python3 python3-flit-core-native" -PEP517_BUILD_API = "flit_core.buildapi" - python_flit_core_do_manual_build () { cd ${PEP517_SOURCE_PATH} nativepython3 -m flit_core.wheel --outdir ${PEP517_WHEEL_PATH} . diff --git a/meta/classes/python_hatchling.bbclass b/meta/classes/python_hatchling.bbclass index b3cbe23601b..984eb6bb5db 100644 --- a/meta/classes/python_hatchling.bbclass +++ b/meta/classes/python_hatchling.bbclass @@ -1,5 +1,3 @@ inherit python_pep517 python3native python3-dir setuptools3-base DEPENDS += "python3-hatchling-native" - -PEP517_BUILD_API = "hatchling.build" diff --git a/meta/classes/python_poetry_core.bbclass b/meta/classes/python_poetry_core.bbclass index 577663b8f17..0aaf66b1944 100644 --- a/meta/classes/python_poetry_core.bbclass +++ b/meta/classes/python_poetry_core.bbclass @@ -1,5 +1,3 @@ inherit python_pep517 python3native setuptools3-base DEPENDS += "python3-poetry-core-native" - -PEP517_BUILD_API = "poetry.core.masonry.api" diff --git a/meta/classes/python_setuptools_build_meta.bbclass b/meta/classes/python_setuptools_build_meta.bbclass index b2bba35a0bc..974054fe5ac 100644 --- a/meta/classes/python_setuptools_build_meta.bbclass +++ b/meta/classes/python_setuptools_build_meta.bbclass @@ -1,5 +1,3 @@ inherit setuptools3-base python_pep517 DEPENDS += "python3-setuptools-native python3-wheel-native" - -PEP517_BUILD_API = "setuptools.build_meta" From patchwork Wed Jul 13 16:28:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 10132 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 905C2C433EF for ; Wed, 13 Jul 2022 16:28:48 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.1.1657729708937501790 for ; Wed, 13 Jul 2022 09:28:29 -0700 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 1C6F415A1; Wed, 13 Jul 2022 09:28:29 -0700 (PDT) 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 E85C13F792; Wed, 13 Jul 2022 09:28:27 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 7/8] python3-hatchling: remove PEP517_BUILD_API Date: Wed, 13 Jul 2022 17:28:20 +0100 Message-Id: <20220713162821.974801-7-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220713162821.974801-1-ross.burton@arm.com> References: <20220713162821.974801-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 ; Wed, 13 Jul 2022 16:28:48 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/167971 Now that we're using picobuild, hatchling can bootstrap itself. Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3-hatchling_1.5.0.bb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/meta/recipes-devtools/python/python3-hatchling_1.5.0.bb b/meta/recipes-devtools/python/python3-hatchling_1.5.0.bb index e453dbdcf75..61b3e87b925 100644 --- a/meta/recipes-devtools/python/python3-hatchling_1.5.0.bb +++ b/meta/recipes-devtools/python/python3-hatchling_1.5.0.bb @@ -10,10 +10,6 @@ DEPENDS:remove:class-native = "python3-hatchling-native" SRC_URI[sha256sum] = "9ca409a41140cc662164680b78adcd3ba77b23a945984bd9970d11fe38e86a38" -# Until we have a proper tool to invoke PEP517 builds, hatchling can't -# bootstrap itself automatically. -PEP517_BUILD_API = "hatchling.ouroboros" - do_compile:prepend() { export PYTHONPATH=src } From patchwork Wed Jul 13 16:28:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 10131 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 A8ED6C43334 for ; Wed, 13 Jul 2022 16:28:38 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.1.1657729709716014826 for ; Wed, 13 Jul 2022 09:28:29 -0700 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 D8B9A1C01; Wed, 13 Jul 2022 09:28:29 -0700 (PDT) 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 01CCB3F792; Wed, 13 Jul 2022 09:28:28 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 8/8] documentation: remove obsolete PEP517_BUILD_API Date: Wed, 13 Jul 2022 17:28:21 +0100 Message-Id: <20220713162821.974801-8-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220713162821.974801-1-ross.burton@arm.com> References: <20220713162821.974801-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 ; Wed, 13 Jul 2022 16:28:38 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/167972 This variable has been obsoleted, so remove it from the documentation. Signed-off-by: Ross Burton --- documentation/ref-manual/classes.rst | 4 +--- documentation/ref-manual/variables.rst | 5 ----- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst index d0ed5392293..424c505715f 100644 --- a/documentation/ref-manual/classes.rst +++ b/documentation/ref-manual/classes.rst @@ -2000,9 +2000,7 @@ The ``python_pep517`` class builds and installs a Python ``wheel`` binary archive (see `PEP-517 `__). Recipes wouldn't inherit this directly, instead typically another class will -inherit this, add the relevant native dependencies, and set -:term:`PEP517_BUILD_API` to the Python class which implements the PEP-517 build -API. +inherit this and add the relevant native dependencies. Examples of classes which do this are :ref:`python_flit_core `, :ref:`python_setuptools_build_meta diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index c4b2119f26c..1710830dc03 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst @@ -5682,11 +5682,6 @@ system and gives an overview of their function and contents. :term:`PE` is the default value of the :term:`PKGE` variable. - :term:`PEP517_BUILD_API` - When used by recipes that inherit the :ref:`python_pep517 - ` class, specifies the entry point to the - PEP-517 compliant build API (such as ``flit_core.buildapi``). - :term:`PEP517_WHEEL_PATH` When used by recipes that inherit the :ref:`python_pep517 ` class,