[2.18][PATCH] doc: bitbake-user-manual-environment-setup: use pip to install bitbake-setup

Antonin Godard <[email protected]>
Newsgroups org.openembedded.lists.bitbake-devel,org.yoctoproject.lists.docs
Message-ID <[email protected]>
bitbake-setup is now available on Pypi[1], so let's use it instead of
a clone of bitbake to use the CLI tool. Refresh commands in consequence.
Keep git clone instructions in a note as an alternative way of setting
things up, and mention how to update it if needed.

[1]: https://pypi.org/project/bitbake-setup/

(cherry picked from commit 414646d56398c7f331872e4ce9820ccffce93abe)

Signed-off-by: Antonin Godard <[email protected]>
Signed-off-by: Mathieu Dubois-Briand <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Antonin Godard <[email protected]>
---
 .../bitbake-user-manual-environment-setup.rst      | 37 ++++++++++++++++------
 1 file changed, 28 insertions(+), 9 deletions(-)

diff --git a/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst b/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst
index c22e19bd665..b3ed2129dd9 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst
@@ -25,20 +25,29 @@ the following tasks:
 Quick Start
 ===========
 
-#. If you haven't already, clone the BitBake repository:
+#. First, run the following command to install the ``bitbake-setup``
+   command-line tool in a Python `virtual environment
+   <https://docs.python.org/3/library/venv.html>`__:
 
    .. code-block:: shell
 
-      $ git clone https://git.openembedded.org/bitbake
+      $ python3 -m venv --clear ./bitbake-setup-venv
+      $ . ./bitbake-setup-venv/bin/activate
+      $ pip install bitbake-setup
 
-#. ``bitbake-setup`` is part of the BitBake source tree under
-   ``./bitbake/bin/bitbake-setup``.
+   .. tip::
 
-   To start, run:
+      To update ``bitbake-setup`` when already installed, you can run:
+
+      .. code-block:: console
+
+         $ pip install --upgrade bitbake-setup
+
+#. To start using ``bitbake-setup``, run:
 
    .. code-block:: shell
 
-      $ ./bitbake/bin/bitbake-setup init
+      $ bitbake-setup init
 
    This command will ask you to choose which configurations to use available as
    part of the default BitBake :term:`Configuration Templates <Configuration
@@ -104,6 +113,16 @@ Quick Start
    on how to use ``bitbake``, see the :doc:`/bitbake-user-manual/bitbake-user-manual-execution`
    section of this manual.
 
+.. note::
+
+   The ``bitbake-setup`` tool is developed and maintained in the BitBake
+   repository and can also be used directly from there:
+
+   .. code-block:: console
+
+      $ git clone https://git.openembedded.org/bitbake ./bitbake
+      $ ./bitbake/bin/bitbake-setup ...
+
 Terminology
 ===========
 
@@ -345,7 +364,7 @@ In addition, the command can take the following arguments:
 
    .. code-block:: shell
 
-      $ ./bitbake/bin/bitbake-setup \
+      $ bitbake-setup \
           --setting default registry 'git://example.com/bitbake-setup-configurations.git;protocol=https;branch=main;rev=main' \
           init
 
@@ -354,7 +373,7 @@ In addition, the command can take the following arguments:
 
    .. code-block:: shell
 
-      $ ./bitbake/bin/bitbake-setup init https://git.openembedded.org/bitbake/plain/default-registry/configurations/oe-nodistro-master.conf.json
+      $ bitbake-setup init https://git.openembedded.org/bitbake/plain/default-registry/configurations/oe-nodistro-master.conf.json
 
 -  This example initializes a :term:`Setup` with:
 
@@ -365,7 +384,7 @@ In addition, the command can take the following arguments:
 
    .. code-block:: shell
 
-      $ ./bitbake/bin/bitbake-setup \
+      $ bitbake-setup \
           --setting default top-dir-prefix /work/bitbake-setup \
           --setting default top-dir-name custom-project \
           init \

---
base-commit: fae9db3168dbff1b8c76fe9c6726a9687ff97514
change-id: 20260819-bitbake-setup-pip-wrynose-ca470a4e97cc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.