summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorTim Orling <ticotimo@gmail.com>2022-02-27 19:55:45 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-04 09:39:37 +0000
commit6f2365a29208c79c547576a4aa3ac65d2303802d (patch)
tree210cdf9513ecd25484cf1aa786cae8f3e3d38746 /documentation
parente2218a968409e88298a746e5dfc97a3204cfea18 (diff)
downloadpoky-6f2365a29208c79c547576a4aa3ac65d2303802d.tar.gz
docs: add new python packaging classes
Add the new classes used for Python packaging: * flit_core * pip_install_wheel * setuptools_build_meta (From yocto-docs rev: f78fe71f634cbf39857c42e90f8c16e511ba2076) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/ref-manual/classes.rst53
1 files changed, 53 insertions, 0 deletions
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index 80ff9298c2..bf39d5e4cc 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -621,6 +621,22 @@ variables are not met, the recipe will be skipped, and if the
621build system attempts to build the recipe then an error will be 621build system attempts to build the recipe then an error will be
622triggered. 622triggered.
623 623
624.. _ref-classes-flit_core:
625
626``flit_core.bbclass``
627=====================
628
629The ``flit_core`` class enables building Python modules which declare
630the `PEP-517 <https://www.python.org/dev/peps/pep-0517/>`__ compliant
631``flit_core.buildapi`` ``build-backend`` in the ``[build-system]``
632section of ``pyproject.toml`` (See `PEP-518 <https://www.python.org/dev/peps/pep-0518/>`__).
633
634Python modules built with ``flit_core.buildapi`` are pure Python (no
635``C`` or ``Rust`` extensions).
636
637The resulting ``wheel`` (See `PEP-427 <https://www.python.org/dev/peps/pep-0427/>`__)
638is installed with the :ref:`pip_install_wheel <ref-classes-pip_install_wheel>` class.
639
624.. _ref-classes-fontcache: 640.. _ref-classes-fontcache:
625 641
626``fontcache.bbclass`` 642``fontcache.bbclass``
@@ -1996,6 +2012,26 @@ When inherited by a recipe, the ``perlnative`` class supports using the
1996native version of Perl built by the build system rather than using the 2012native version of Perl built by the build system rather than using the
1997version provided by the build host. 2013version provided by the build host.
1998 2014
2015.. _ref-classes-pip_install_wheel:
2016
2017``pip_install_wheel.bbclass``
2018=============================
2019
2020The ``pip_install_wheel`` class uses ``pip`` to install a Python ``wheel``
2021binary archive format (See `PEP-427 <https://www.python.org/dev/peps/pep-0427/>`__)
2022
2023The Python ``wheel`` can be built with several classes, including :ref:`flit_core <ref-classes-flit_core>`,
2024:ref:`setuptools_build_meta <ref-classes-setuptools_build_meta>`, and :ref:`setuptools3 <ref-classes-setuptools3>`.
2025
2026The absolute path to the built ``wheel`` to be installed is defined by :term:`PYPA_WHEEL` which can be
2027overriden for recipes where the filename or version number of the wheel are not easily
2028determined by the defaults. Other variables which can be used to customize the behavior
2029of the ``pip_install_wheel`` class include:
2030
2031- :term:`PIP_INSTALL_ARGS`
2032- :term:`PIP_INSTALL_PACKAGE`
2033- :term:`PIP_INSTALL_DIST_PATH`
2034
1999.. _ref-classes-pixbufcache: 2035.. _ref-classes-pixbufcache:
2000 2036
2001``pixbufcache.bbclass`` 2037``pixbufcache.bbclass``
@@ -2351,6 +2387,23 @@ additional configuration options you want to pass SCons command line.
2351The ``sdl`` class supports recipes that need to build software that uses 2387The ``sdl`` class supports recipes that need to build software that uses
2352the Simple DirectMedia Layer (SDL) library. 2388the Simple DirectMedia Layer (SDL) library.
2353 2389
2390.. _ref-classes-setuptools_build_meta:
2391
2392``setuptools_build_meta.bbclass``
2393=================================
2394
2395The ``setuptools_build_meta`` class enables building Python modules which
2396declare the
2397`PEP-517 <https://www.python.org/dev/peps/pep-0517/>`__ compliant
2398``setuptools.build_meta`` ``build-backend`` in the ``[build-system]``
2399section of ``pyproject.toml`` (See `PEP-518 <https://www.python.org/dev/peps/pep-0518/>`__).
2400
2401Python modules built with ``setuptools.build_meta`` can be pure Python or
2402include ``C`` or ``Rust`` extensions).
2403
2404The resulting ``wheel`` (See `PEP-427 <https://www.python.org/dev/peps/pep-0427/>`__)
2405is installed with the :ref:`pip_install_wheel <ref-classes-pip_install_wheel>` class.
2406
2354.. _ref-classes-setuptools3: 2407.. _ref-classes-setuptools3:
2355 2408
2356``setuptools3.bbclass`` 2409``setuptools3.bbclass``