From patchwork Fri Sep 4 13:36:09 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 97312 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 E8412C79F82 for ; Fri, 4 Sep 2026 13:36:27 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.14030.1788528978598289964 for ; Fri, 04 Sep 2026 06:36:18 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@arm.com header.s=foss header.b=KN8N1h5O; 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 5E8DD152B for ; Fri, 4 Sep 2026 06:36:14 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.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 ESMTPA id A7A373F7D8 for ; Fri, 4 Sep 2026 06:36:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1788528978; bh=CNgXIB5DljLDY3RSidcTRnJezIFFTRMq7gs4yZf+ZWw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KN8N1h5OsbGM4UaaRcec9oTbIDeCxqNWFJx3PMx+jDSZ5ISVcwbPCUeexx1F6mqzQ CCgZxG1XaZUlor5ATfv0MThaOVFi3/G07jL3AcXVgcE1E20l58+LX5oDMpjzqobebg eMELljZERBtulPQ61UDdRz9vnCerTw7qPzHzL1tc= From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 3/4] classes/pypi: rename pypi_package() to pypi_default_package() Date: Fri, 4 Sep 2026 14:36:09 +0100 Message-ID: <20260904133610.774110-3-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260904133610.774110-1-ross.burton@arm.com> References: <20260904133610.774110-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 04 Sep 2026 13:36:27 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/245106 Make it clear that this function returns a default value. Signed-off-by: Ross Burton --- meta/classes-recipe/pypi.bbclass | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meta/classes-recipe/pypi.bbclass b/meta/classes-recipe/pypi.bbclass index b42b171e151..eb13ffe7e71 100644 --- a/meta/classes-recipe/pypi.bbclass +++ b/meta/classes-recipe/pypi.bbclass @@ -4,7 +4,11 @@ # SPDX-License-Identifier: MIT # -def pypi_package(d): +def pypi_default_package(d): + """ + Return a reasonable guess for the PyPI package name by + stripping any python- prefix from PN. + """ bpn = d.getVar('BPN') if bpn.startswith('python-'): return bpn[7:] @@ -13,7 +17,7 @@ def pypi_package(d): return bpn # The PyPi package name (defaults to PN without the python3- prefix) -PYPI_PACKAGE ?= "${@pypi_package(d)}" +PYPI_PACKAGE ?= "${@pypi_default_package(d)}" # The file extension of the source archive PYPI_PACKAGE_EXT ?= "tar.gz" # An optional prefix for the download file in the case of name collisions