diff mbox series

doc: bitbake-user-manual-environment-setup: use pip to install bitbake-setup

Message ID 20260813-bitbake-setup-pip-v1-1-f45ae8cd5fb0@bootlin.com
State New
Headers show
Series doc: bitbake-user-manual-environment-setup: use pip to install bitbake-setup | expand

Commit Message

Antonin Godard Aug. 13, 2026, 7:50 a.m. UTC
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/

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 .../bitbake-user-manual-environment-setup.rst      | 37 ++++++++++++++++------
 1 file changed, 28 insertions(+), 9 deletions(-)


---
base-commit: 7a3cb0d55e3698e883a9ff8491febc9d155482ca
change-id: 20260813-bitbake-setup-pip-33e1489727f3
diff mbox series

Patch

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 c32a6964a43..e15c9ed0de2 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 \