summaryrefslogtreecommitdiffstats
path: root/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
diff options
context:
space:
mode:
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