All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* numerous superfluous PYPI_PACKAGE assignments in meta-python?
@ 2020-05-16 18:19 Robert P. J. Day
  0 siblings, 0 replies; only message in thread
From: Robert P. J. Day @ 2020-05-16 18:19 UTC (permalink / raw
  To: Yocto discussion list


  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:

  python3-smbus2_0.3.0.bb:PYPI_PACKAGE = "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:

 python3-sqlalchemy_1.3.12.bb:PYPI_PACKAGE = "SQLAlchemy"
 python3-websocket-client_0.56.0.bb:PYPI_PACKAGE = "websocket_client"
 python-django-south.inc:PYPI_PACKAGE = "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.)

rday

p.s. on that note, i was curious about the recipe file
python3-twitter_3.8.0.bb, which contained the line:

  PYPI_PACKAGE = "tweepy"

under the circumstances, why not have just named the recipe file
python3-tweepy...?

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-16 18:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-16 18:19 numerous superfluous PYPI_PACKAGE assignments in meta-python? Robert P. J. Day

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.