diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-11-07 13:31:53 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-11-07 13:31:53 +0000 |
| commit | 8c22ff0d8b70d9b12f0487ef696a7e915b9e3173 (patch) | |
| tree | efdc32587159d0050a69009bdf2330a531727d95 /documentation/dev-manual/python-development-shell.rst | |
| parent | d412d2747595c1cc4a5e3ca975e3adc31b2f7891 (diff) | |
| download | poky-8c22ff0d8b70d9b12f0487ef696a7e915b9e3173.tar.gz | |
The poky repository master branch is no longer being updated.
You can either:
a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs
b) use the new bitbake-setup
You can find information about either approach in our documentation:
https://docs.yoctoproject.org/
Note that "poky" the distro setting is still available in meta-yocto as
before and we continue to use and maintain that.
Long live Poky!
Some further information on the background of this change can be found
in: https://lists.openembedded.org/g/openembedded-architecture/message/2179
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual/python-development-shell.rst')
| -rw-r--r-- | documentation/dev-manual/python-development-shell.rst | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/documentation/dev-manual/python-development-shell.rst b/documentation/dev-manual/python-development-shell.rst deleted file mode 100644 index 81a5c43472..0000000000 --- a/documentation/dev-manual/python-development-shell.rst +++ /dev/null | |||
| @@ -1,50 +0,0 @@ | |||
| 1 | .. SPDX-License-Identifier: CC-BY-SA-2.0-UK | ||
| 2 | |||
| 3 | Using a Python Development Shell | ||
| 4 | ******************************** | ||
| 5 | |||
| 6 | Similar to working within a development shell as described in the | ||
| 7 | previous section, you can also spawn and work within an interactive | ||
| 8 | Python development shell. When debugging certain commands or even when | ||
| 9 | just editing packages, ``pydevshell`` can be a useful tool. When you | ||
| 10 | invoke the ``pydevshell`` task, all tasks up to and including | ||
| 11 | :ref:`ref-tasks-patch` are run for the | ||
| 12 | specified target. Then a new terminal is opened. Additionally, key | ||
| 13 | Python objects and code are available in the same way they are to | ||
| 14 | BitBake tasks, in particular, the data store 'd'. So, commands such as | ||
| 15 | the following are useful when exploring the data store and running | ||
| 16 | functions:: | ||
| 17 | |||
| 18 | pydevshell> d.getVar("STAGING_DIR") | ||
| 19 | '/media/build1/poky/build/tmp/sysroots' | ||
| 20 | pydevshell> d.getVar("STAGING_DIR", False) | ||
| 21 | '${TMPDIR}/sysroots' | ||
| 22 | pydevshell> d.setVar("FOO", "bar") | ||
| 23 | pydevshell> d.getVar("FOO") | ||
| 24 | 'bar' | ||
| 25 | pydevshell> d.delVar("FOO") | ||
| 26 | pydevshell> d.getVar("FOO") | ||
| 27 | pydevshell> bb.build.exec_func("do_unpack", d) | ||
| 28 | pydevshell> | ||
| 29 | |||
| 30 | See the ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:functions you can call from within python`" | ||
| 31 | section in the BitBake User Manual for details about available functions. | ||
| 32 | |||
| 33 | The commands execute just as if the OpenEmbedded build | ||
| 34 | system were executing them. Consequently, working this way can be | ||
| 35 | helpful when debugging a build or preparing software to be used with the | ||
| 36 | OpenEmbedded build system. | ||
| 37 | |||
| 38 | Here is an example that uses ``pydevshell`` on a target named | ||
| 39 | ``matchbox-desktop``:: | ||
| 40 | |||
| 41 | $ bitbake matchbox-desktop -c pydevshell | ||
| 42 | |||
| 43 | This command spawns a terminal and places you in an interactive Python | ||
| 44 | interpreter within the OpenEmbedded build environment. The | ||
| 45 | :term:`OE_TERMINAL` variable | ||
| 46 | controls what type of shell is opened. | ||
| 47 | |||
| 48 | When you are finished using ``pydevshell``, you can exit the shell | ||
| 49 | either by using Ctrl+d or closing the terminal window. | ||
| 50 | |||
