Make it clear that this function returns a default value.

Signed-off-by: Ross Burton <[email protected]>
---
 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
-- 
2.43.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#245112): 
https://lists.openembedded.org/g/openembedded-core/message/245112
Mute This Topic: https://lists.openembedded.org/mt/121085955/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to