summaryrefslogtreecommitdiffstats
path: root/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
diff options
context:
space:
mode:
authorPaul Eggleton <bluelightning@bluelightning.org>2023-04-22 15:05:22 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-04-22 10:30:30 +0100
commit433a90204c63420910ade1fe70d303e7baf30e8b (patch)
tree6179c3f587df32d196777d9dd041c5c29f1917ec /bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
parentc02016024846640bd0e5505a8a2b788be642ac6f (diff)
downloadpoky-433a90204c63420910ade1fe70d303e7baf30e8b.tar.gz
bitbake: bitbake-user-manual: add addpylib and BB_GLOBAL_PYMODULES
New directive and variable for 2.4. (Bitbake rev: 1b74a7b71e6c8a034163b57ef4e13b4a58c1f844) Signed-off-by: Paul Eggleton <bluelightning@bluelightning.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst')
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst18
1 files changed, 18 insertions, 0 deletions
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
index ba8129afab..b35c332c82 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
@@ -1972,6 +1972,24 @@ looking at the source code of the ``bb`` module, which is in
1972the commonly used functions ``bb.utils.contains()`` and 1972the commonly used functions ``bb.utils.contains()`` and
1973``bb.utils.mkdirhier()``, which come with docstrings. 1973``bb.utils.mkdirhier()``, which come with docstrings.
1974 1974
1975Extending Python Library Code
1976-----------------------------
1977
1978If you wish to add your own Python library code (e.g. to provide
1979functions/classes you can use from Python functions in the metadata)
1980you can do so from any layer using the ``addpylib`` directive.
1981This directive is typically added to your layer configuration (
1982``conf/layer.conf``) although it will be handled in any ``.conf`` file.
1983
1984Usage is of the form::
1985
1986 addpylib <directory> <namespace>
1987
1988Where <directory> specifies the directory to add to the library path.
1989The specified <namespace> is imported automatically, and if the imported
1990module specifies an attribute named ``BBIMPORTS``, that list of
1991sub-modules is iterated and imported too.
1992
1975Testing and Debugging BitBake Python code 1993Testing and Debugging BitBake Python code
1976----------------------------------------- 1994-----------------------------------------
1977 1995