numerous superfluous PYPI_PACKAGE assignments in meta-python?

Robert P. J. Day

in aid of docs, currently poring over python-based recipes to
document how one builds python recipe files, and noticed that numerous
recipe files contain an assignment of the form: = "smbus2"

which seems superfluous given that pypi.bbclass contains:

def pypi_package(d):
bpn = d.getVar('BPN')
if bpn.startswith('python-'):
return bpn[7:]
elif bpn.startswith('python3-'):
return bpn[8:]
return bpn

PYPI_PACKAGE ?= "${@pypi_package(d)}"

clearly harmless but, in the above example, unnecessary, no?

there are, of course, numerous recipes that require an assignment of
that form as the actual PyPI package name is some annoying variation,
such as: = "SQLAlchemy" = "websocket_client" = "South"

and so on, i just want to be able to write that as long as the recipe
file name *exactly* matches the PyPI package name, that assignment is
unnecessary. (i'm a minimalist.)


p.s. on that note, i was curious about the recipe file, which contained the line:

PYPI_PACKAGE = "tweepy"

under the circumstances, why not have just named the recipe file

Join to automatically receive all group messages.