From patchwork Tue Mar 8 14:30: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: 4937 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 C3ECAC433EF for ; Tue, 8 Mar 2022 14:30:41 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.8703.1646749840906692608 for ; Tue, 08 Mar 2022 06:30: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 9AD95139F for ; Tue, 8 Mar 2022 06:30: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 474B43FA58 for ; Tue, 8 Mar 2022 06:30:40 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 6/6] python3-flit-core: improve recipe Date: Tue, 8 Mar 2022 14:30:35 +0000 Message-Id: <20220308143035.3569559-6-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220308143035.3569559-1-ross.burton@arm.com> References: <20220308143035.3569559-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 ; Tue, 08 Mar 2022 14:30:41 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162927 flit_core can bootstrap itself, so the python3-flit-core recipe can just inherit flit_core and set PEP517_SOURCE_PATH to the flit_core submodule. Also setting FILES:${PN} is redundant. Signed-off-by: Ross Burton --- .../python/python3-flit-core_3.7.1.bb | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) 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 f5e7506d5d..55ce256550 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 @@ -10,31 +10,22 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=41eb78fa8a872983a882c694a8305f08" SRC_URI[sha256sum] = "3c9bd9c140515bfe62dd938c6610d10d6efb9e35cc647fc614fe5fb3a5036682" -inherit pip_install_wheel python3native python3-dir pypi setuptools3-base +inherit pypi flit_core +# Need to install by hand as there's a dependency loop DEPENDS:remove:class-native = " python3-pip-native" DEPENDS:append:class-native = " unzip-native" # We need the full flit tarball PYPI_PACKAGE = "flit" - +PEP517_SOURCE_PATH = "${S}/flit_core" PIP_INSTALL_PACKAGE = "flit_core" -PIP_INSTALL_DIST_PATH = "${S}/flit_core/dist" - -do_compile () { - nativepython3 flit_core/build_dists.py -} do_install:class-native () { install -d ${D}${PYTHON_SITEPACKAGES_DIR} - unzip -d ${D}${PYTHON_SITEPACKAGES_DIR} ./flit_core/dist/flit_core-${PV}-py3-none-any.whl + unzip -d ${D}${PYTHON_SITEPACKAGES_DIR} ${PIP_INSTALL_DIST_PATH}/flit_core*.whl } -FILES:${PN} += "\ - ${PYTHON_SITEPACKAGES_DIR}/flit_core/* \ - ${PYTHON_SITEPACKAGES_DIR}/flit_core-${PV}.dist-info/* \ -" - PACKAGES =+ "${PN}-tests" FILES:${PN}-tests += "\ @@ -42,4 +33,3 @@ FILES:${PN}-tests += "\ " BBCLASSEXTEND = "native nativesdk" -