From patchwork Tue Mar 8 19:31:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 4969 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 A45B0C433F5 for ; Tue, 8 Mar 2022 19:31:36 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.12620.1646767895266748175 for ; Tue, 08 Mar 2022 11:31:35 -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 A0A141655 for ; Tue, 8 Mar 2022 11:31:34 -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 4C1AC3FA45 for ; Tue, 8 Mar 2022 11:31:34 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 2/2] pip_install_wheel: generate the wheels in directory we control outside of S Date: Tue, 8 Mar 2022 19:31:28 +0000 Message-Id: <20220308193128.1036345-2-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220308193128.1036345-1-ross.burton@arm.com> References: <20220308193128.1036345-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 19:31:36 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162943 Set the wheel distribution location, PIP_INSTALL_DIST_PATH, to a directory under WORKDIR to enhance out-of-tree builds. Signed-off-by: Ross Burton --- meta/classes/pip_install_wheel.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meta/classes/pip_install_wheel.bbclass b/meta/classes/pip_install_wheel.bbclass index febcc8e445..954a6b750f 100644 --- a/meta/classes/pip_install_wheel.bbclass +++ b/meta/classes/pip_install_wheel.bbclass @@ -7,7 +7,12 @@ def guess_pip_install_package_name(d): return name.replace('-', '_') PIP_INSTALL_PACKAGE ?= "${@guess_pip_install_package_name(d)}" -PIP_INSTALL_DIST_PATH ?= "${@d.getVar('SETUPTOOLS_SETUP_PATH') or d.getVar('B')}/dist" + +# The directory where wheels should be written too. Build classes +# will ideally [cleandirs] this but we don't do that here in case +# a recipe wants to install prebuilt wheels. +PIP_INSTALL_DIST_PATH ?= "${WORKDIR}/dist" + PYPA_WHEEL ??= "${PIP_INSTALL_DIST_PATH}/${PIP_INSTALL_PACKAGE}-*-*.whl" PIP_INSTALL_ARGS = "\