From af3beeecfbce858669065f2e9b67db597e922c15 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Fri, 7 Oct 2022 10:54:20 +1300 Subject: ref-manual: add pypi class Add missing documentation for the pypi class. (From yocto-docs rev: d387ca891ad3a7d00ec3cb5f994dc5832c885d54) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- documentation/ref-manual/classes.rst | 15 +++++++++++++++ documentation/ref-manual/variables.rst | 8 ++++++++ 2 files changed, 23 insertions(+) (limited to 'documentation') diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst index d94db03616..f6f341e104 100644 --- a/documentation/ref-manual/classes.rst +++ b/documentation/ref-manual/classes.rst @@ -2005,6 +2005,21 @@ When inherited by a recipe, the ``perlnative`` class supports using the native version of Perl built by the build system rather than using the version provided by the build host. +.. _ref-classes-pypi: + +``pypi.bbclass`` +================ + +The ``pypi`` class sets variables appropriately for recipes that build +Python modules from `PyPI `__, the Python Package Index. +By default it determines the PyPI package name based upon :term:`BPN` +(stripping the "python-" or "python3-" prefix off if present), however in +some cases you may need to set it manually in the recipe by setting +:term:`PYPI_PACKAGE`. + +Variables set by the ``pypi`` class include :term:`SRC_URI`, :term:`SECTION`, +:term:`HOMEPAGE`, :term:`UPSTREAM_CHECK_URI`, and :term:`UPSTREAM_CHECK_REGEX`. + .. _ref-classes-python_flit_core: ``python_flit_core.bbclass`` diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index 067f8eed63..2685c61219 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst @@ -6177,6 +6177,14 @@ system and gives an overview of their function and contents. :term:`PV` is the default value of the :term:`PKGV` variable. + :term:`PYPI_PACKAGE` + When inheriting the :ref:`pypi ` class, specifies the + `PyPI `__ package name to be built. The default value + is set based upon :term:`BPN` (stripping any "python-" or "python3-" + prefix off if present), however for some packages it will need to be set + explicitly if that will not match the package name (e.g. where the + package name has a prefix, underscores, uppercase letters etc.) + :term:`PYTHON_ABI` When used by recipes that inherit the :ref:`setuptools3 ` class, denotes the -- cgit v1.2.3-54-g00ecf