diff options
| author | Tim Orling <ticotimo@gmail.com> | 2022-02-27 19:55:45 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-04 09:39:37 +0000 |
| commit | 6f2365a29208c79c547576a4aa3ac65d2303802d (patch) | |
| tree | 210cdf9513ecd25484cf1aa786cae8f3e3d38746 | |
| parent | e2218a968409e88298a746e5dfc97a3204cfea18 (diff) | |
| download | poky-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>
| -rw-r--r-- | documentation/ref-manual/classes.rst | 53 |
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 | |||
| 621 | build system attempts to build the recipe then an error will be | 621 | build system attempts to build the recipe then an error will be |
| 622 | triggered. | 622 | triggered. |
| 623 | 623 | ||
| 624 | .. _ref-classes-flit_core: | ||
| 625 | |||
| 626 | ``flit_core.bbclass`` | ||
| 627 | ===================== | ||
| 628 | |||
| 629 | The ``flit_core`` class enables building Python modules which declare | ||
| 630 | the `PEP-517 <https://www.python.org/dev/peps/pep-0517/>`__ compliant | ||
| 631 | ``flit_core.buildapi`` ``build-backend`` in the ``[build-system]`` | ||
| 632 | section of ``pyproject.toml`` (See `PEP-518 <https://www.python.org/dev/peps/pep-0518/>`__). | ||
| 633 | |||
| 634 | Python modules built with ``flit_core.buildapi`` are pure Python (no | ||
| 635 | ``C`` or ``Rust`` extensions). | ||
| 636 | |||
| 637 | The resulting ``wheel`` (See `PEP-427 <https://www.python.org/dev/peps/pep-0427/>`__) | ||
| 638 | is 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 | |||
| 1996 | native version of Perl built by the build system rather than using the | 2012 | native version of Perl built by the build system rather than using the |
| 1997 | version provided by the build host. | 2013 | version provided by the build host. |
| 1998 | 2014 | ||
| 2015 | .. _ref-classes-pip_install_wheel: | ||
| 2016 | |||
| 2017 | ``pip_install_wheel.bbclass`` | ||
| 2018 | ============================= | ||
| 2019 | |||
| 2020 | The ``pip_install_wheel`` class uses ``pip`` to install a Python ``wheel`` | ||
| 2021 | binary archive format (See `PEP-427 <https://www.python.org/dev/peps/pep-0427/>`__) | ||
| 2022 | |||
| 2023 | The 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 | |||
| 2026 | The absolute path to the built ``wheel`` to be installed is defined by :term:`PYPA_WHEEL` which can be | ||
| 2027 | overriden for recipes where the filename or version number of the wheel are not easily | ||
| 2028 | determined by the defaults. Other variables which can be used to customize the behavior | ||
| 2029 | of 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. | |||
| 2351 | The ``sdl`` class supports recipes that need to build software that uses | 2387 | The ``sdl`` class supports recipes that need to build software that uses |
| 2352 | the Simple DirectMedia Layer (SDL) library. | 2388 | the Simple DirectMedia Layer (SDL) library. |
| 2353 | 2389 | ||
| 2390 | .. _ref-classes-setuptools_build_meta: | ||
| 2391 | |||
| 2392 | ``setuptools_build_meta.bbclass`` | ||
| 2393 | ================================= | ||
| 2394 | |||
| 2395 | The ``setuptools_build_meta`` class enables building Python modules which | ||
| 2396 | declare the | ||
| 2397 | `PEP-517 <https://www.python.org/dev/peps/pep-0517/>`__ compliant | ||
| 2398 | ``setuptools.build_meta`` ``build-backend`` in the ``[build-system]`` | ||
| 2399 | section of ``pyproject.toml`` (See `PEP-518 <https://www.python.org/dev/peps/pep-0518/>`__). | ||
| 2400 | |||
| 2401 | Python modules built with ``setuptools.build_meta`` can be pure Python or | ||
| 2402 | include ``C`` or ``Rust`` extensions). | ||
| 2403 | |||
| 2404 | The resulting ``wheel`` (See `PEP-427 <https://www.python.org/dev/peps/pep-0427/>`__) | ||
| 2405 | is 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`` |
