File: installing.rst

package info (click to toggle)
b4 0.14.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,788 kB
  • sloc: python: 10,145; sh: 38; makefile: 7
file content (70 lines) | stat: -rw-r--r-- 1,895 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Installing b4
=============
B4 is packaged for many distributions, so chances are that you will be
able to install it using your regular package installation commands,
e.g.::

    # dnf install b4

or::

    # apt install b4

Note, that b4 is under heavy development, so it is possible that the
version packaged for your distribution is not as recent as you'd like.
If that is the case, you can install it from other sources.

Installing with pip
-------------------
To install from PyPi::

    python3 -m pip install --user b4

This will install b4 locally and pull in any required dependencies. If
you are not able to execute ``b4 --version`` after pip completes, check
that your ``~/.local/bin/`` is in your ``$PATH``.

Upgrading
~~~~~~~~~
If you have previously installed from PyPi, you can upgrade using pip as
well::

    python3 -m pip install --user --upgrade b4

Running from the checkout dir
-----------------------------
If you want to run the latest development version of b4, you can run it
directly from the git repository::

    git clone https://git.kernel.org/pub/scm/utils/b4/b4.git
    cd b4
    git submodule update --init
    pip install --user -r requirements.txt

You can then either symlink the ``b4.sh`` script to your user-bin
directory::

    ln -sf $HOME/path/to/b4.sh ~/bin/b4

or you can add an alias to your shell's RC file::

    alias b4="$HOME/path/to/b4/b4.sh"

Using a stable branch
~~~~~~~~~~~~~~~~~~~~~
If you don't want to use the master branch (which may not be stable),
you can switch to a stable branch instead, e.g.::

    git switch stable-0.9.y

Updating the git checkout
~~~~~~~~~~~~~~~~~~~~~~~~~
It should be sufficient to just turn ``git pull``::

    git pull origin master
    git submodule update

If you notice that ``requirements.txt`` has been updated, you may wish
to run the pip command again::

    pip install --user -r requirements.txt