summaryrefslogtreecommitdiffstats
path: root/documentation/ref-manual
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2022-03-21 15:09:27 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-31 11:46:03 +0100
commitf4549231b28caff74e0e81ad8f78b7bd116c3677 (patch)
treed3303f875d096c4f476cfd60260385ced6334203 /documentation/ref-manual
parent28f244252037be8291e612d072bd4e4c263cb626 (diff)
downloadpoky-f4549231b28caff74e0e81ad8f78b7bd116c3677.tar.gz
ref-manual: update Python class documentation
Add new PEP517_* variables, remove obsolete variables, and update for renamed classes. (From yocto-docs rev: 3984d4d0804125ba6fba7bf712edb81f97b4bec7) Signed-off-by: Ross Burton <ross.burton@arm.com> Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/ref-manual')
-rw-r--r--documentation/ref-manual/classes.rst71
-rw-r--r--documentation/ref-manual/variables.rst11
2 files changed, 46 insertions, 36 deletions
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index 4dd0901623..6ba792d3f9 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -602,22 +602,6 @@ variables are not met, the recipe will be skipped, and if the
602build system attempts to build the recipe then an error will be 602build system attempts to build the recipe then an error will be
603triggered. 603triggered.
604 604
605.. _ref-classes-flit_core:
606
607``flit_core.bbclass``
608=====================
609
610The ``flit_core`` class enables building Python modules which declare
611the `PEP-517 <https://www.python.org/dev/peps/pep-0517/>`__ compliant
612``flit_core.buildapi`` ``build-backend`` in the ``[build-system]``
613section of ``pyproject.toml`` (See `PEP-518 <https://www.python.org/dev/peps/pep-0518/>`__).
614
615Python modules built with ``flit_core.buildapi`` are pure Python (no
616``C`` or ``Rust`` extensions).
617
618The resulting ``wheel`` (See `PEP-427 <https://www.python.org/dev/peps/pep-0427/>`__)
619is installed with the :ref:`python_pep517 <ref-classes-python_pep517>` class.
620
621.. _ref-classes-fontcache: 605.. _ref-classes-fontcache:
622 606
623``fontcache.bbclass`` 607``fontcache.bbclass``
@@ -1978,20 +1962,48 @@ When inherited by a recipe, the ``perlnative`` class supports using the
1978native version of Perl built by the build system rather than using the 1962native version of Perl built by the build system rather than using the
1979version provided by the build host. 1963version provided by the build host.
1980 1964
1965.. _ref-classes-python_flit_core:
1966
1967``python_flit_core.bbclass``
1968============================
1969
1970The ``python_flit_core`` class enables building Python modules which declare
1971the `PEP-517 <https://www.python.org/dev/peps/pep-0517/>`__ compliant
1972``flit_core.buildapi`` ``build-backend`` in the ``[build-system]``
1973section of ``pyproject.toml`` (See `PEP-518 <https://www.python.org/dev/peps/pep-0518/>`__).
1974
1975Python modules built with ``flit_core.buildapi`` are pure Python (no
1976``C`` or ``Rust`` extensions).
1977
1978Internally this uses the :ref:`python_pep517 <ref-classes-python_pep517>` class.
1979
1981.. _ref-classes-python_pep517: 1980.. _ref-classes-python_pep517:
1982 1981
1983``python_pep517.bbclass`` 1982``python_pep517.bbclass``
1984============================= 1983=========================
1984
1985The ``python_pep517`` class builds and installs a Python ``wheel`` binary
1986archive (see `PEP-517 <https://peps.python.org/pep-0517/>`__).
1985 1987
1986The ``python_pep517`` class installs a Python ``wheel`` binary archive (see 1988Recipes wouldn't inherit this directly, instead typically another class will
1987`PEP-517 <https://peps.python.org/pep-0517/>`__). 1989inherit this, add the relevant native dependencies, and set
1990:term:`PEP517_BUILD_API` to the Python class which implements the PEP-517 build
1991API.
1988 1992
1989The Python ``wheel`` can be built with several classes, including :ref:`flit_core <ref-classes-flit_core>`, 1993Examples of classes which do this are :ref:`python_flit_core
1990:ref:`setuptools_build_meta <ref-classes-setuptools_build_meta>`, and :ref:`setuptools3 <ref-classes-setuptools3>`. 1994<ref-classes-python_flit_core>`, :ref:`python_setuptools_build_meta
1995<ref-classes-python_setuptools_build_meta>`, and :ref:`python_poetry_core
1996<ref-classes-python_poetry_core>`.
1991 1997
1992The path to the wheel to be installed is defined by :term:`PEP517_WHEEL_PATH`. 1998.. _ref-classes-python_poetry_core:
1993This defaults to ``${D}/dist`` and should be respected by the builder class 1999
1994(such as :ref:`flit_core <ref-classes-flit_core>`). 2000``python_poetry_core.bbclass``
2001==============================
2002
2003The ``python_poetry_core`` class enables building Python modules which use the
2004`Poetry Core <https://python-poetry.org>`__ build system.
2005
2006Internally this uses the :ref:`python_pep517 <ref-classes-python_pep517>` class.
1995 2007
1996.. _ref-classes-pixbufcache: 2008.. _ref-classes-pixbufcache:
1997 2009
@@ -2348,12 +2360,12 @@ additional configuration options you want to pass SCons command line.
2348The ``sdl`` class supports recipes that need to build software that uses 2360The ``sdl`` class supports recipes that need to build software that uses
2349the Simple DirectMedia Layer (SDL) library. 2361the Simple DirectMedia Layer (SDL) library.
2350 2362
2351.. _ref-classes-setuptools_build_meta: 2363.. _ref-classes-python_setuptools_build_meta:
2352 2364
2353``setuptools_build_meta.bbclass`` 2365``python_setuptools_build_meta.bbclass``
2354================================= 2366========================================
2355 2367
2356The ``setuptools_build_meta`` class enables building Python modules which 2368The ``python_setuptools_build_meta`` class enables building Python modules which
2357declare the 2369declare the
2358`PEP-517 <https://www.python.org/dev/peps/pep-0517/>`__ compliant 2370`PEP-517 <https://www.python.org/dev/peps/pep-0517/>`__ compliant
2359``setuptools.build_meta`` ``build-backend`` in the ``[build-system]`` 2371``setuptools.build_meta`` ``build-backend`` in the ``[build-system]``
@@ -2362,8 +2374,7 @@ section of ``pyproject.toml`` (See `PEP-518 <https://www.python.org/dev/peps/pep
2362Python modules built with ``setuptools.build_meta`` can be pure Python or 2374Python modules built with ``setuptools.build_meta`` can be pure Python or
2363include ``C`` or ``Rust`` extensions). 2375include ``C`` or ``Rust`` extensions).
2364 2376
2365The resulting ``wheel`` (See `PEP-427 <https://www.python.org/dev/peps/pep-0427/>`__) 2377Internally this uses the :ref:`python_pep517 <ref-classes-python_pep517>` class.
2366is installed with the :ref:`python_pep517 <ref-classes-python_pep517>` class.
2367 2378
2368.. _ref-classes-setuptools3: 2379.. _ref-classes-setuptools3:
2369 2380
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index 634f19a673..781cd19765 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -5632,6 +5632,11 @@ system and gives an overview of their function and contents.
5632 5632
5633 :term:`PE` is the default value of the :term:`PKGE` variable. 5633 :term:`PE` is the default value of the :term:`PKGE` variable.
5634 5634
5635 :term:`PEP517_BUILD_API`
5636 When used by recipes that inherit the :ref:`python_pep517
5637 <ref-classes-python_pep517>` class, specifies the entry point to the
5638 PEP-517 compliant build API (such as ``flit_core.buildapi``).
5639
5635 :term:`PEP517_WHEEL_PATH` 5640 :term:`PEP517_WHEEL_PATH`
5636 When used by recipes that inherit the 5641 When used by recipes that inherit the
5637 :ref:`python_pep517 <ref-classes-python_pep517>` class, 5642 :ref:`python_pep517 <ref-classes-python_pep517>` class,
@@ -5644,12 +5649,6 @@ system and gives an overview of their function and contents.
5644 ``bash-4.2-r1/``). This variable is comprised of the following: 5649 ``bash-4.2-r1/``). This variable is comprised of the following:
5645 ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`} 5650 ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`}
5646 5651
5647 :term:`PIP_INSTALL_ARGS`
5648 When used by recipes that inherit the
5649 :ref:`python_pep517 <ref-classes-python_pep517>` class,
5650 denotes the arguments passed to ``pip install`` to adjust the
5651 behavior of how the ``wheel`` is installed.
5652
5653 :term:`PIXBUF_PACKAGES` 5652 :term:`PIXBUF_PACKAGES`
5654 When inheriting the :ref:`pixbufcache <ref-classes-pixbufcache>` 5653 When inheriting the :ref:`pixbufcache <ref-classes-pixbufcache>`
5655 class, this variable identifies packages that contain the pixbuf 5654 class, this variable identifies packages that contain the pixbuf