[sdk/kde-builder] doc/getting-started: doc: Describe installation with uv
Andrew Shark <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit eba917dfec9b9fdfc290a3065c7bcf66e3e795d6 by Andrew Shark.
Committed on 08/08/2026 at 22:54.
Pushed by ashark into branch 'master'.
doc: Describe installation with uv
D +0 -122 doc/getting-started/alternative-installation.md
M +13 -26 doc/getting-started/before-building.md
M +1 -1 doc/getting-started/index.md
C +1 -39 doc/getting-started/legacy-installation.md [from: doc/getting-started/before-building.md - 052% similarity]
https://invent.kde.org/sdk/kde-builder/-/commit/eba917dfec9b9fdfc290a3065c7bcf66e3e795d6
diff --git a/doc/getting-started/alternative-installation.md b/doc/getting-started/alternative-installation.md
deleted file mode 100644
index cd5f5566..00000000
--- a/doc/getting-started/alternative-installation.md
+++ /dev/null
@@ -1,122 +0,0 @@
-# Alternative Installation Methods
-
-If the `initial_setup.sh` installation method does not work for you, you can choose one of the alternative methods.
-
-KDE Builder can use Python version 3.10 or newer.
-
-If python is not installed, do it now (assuming you want to use Python 3.11):
-
-* Arch Linux: `sudo pacman -S python`
-* Fedora 39: `sudo dnf install python3.11`
-* openSUSE Tumbleweed: `sudo zypper install python311`
-* Debian/Ubuntu: `sudo apt install python3`
-
-There are several ways of installation. Choose the one that fits you most.
-
-| Installation way | Notes |
-|-----------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------|
-| [Manual git checkout of kde-builder, use Python packages from your operating system](#using-system-environment) | Requires that all python dependencies be provided by distro. |
-| [Manual git checkout of kde-builder, use a Python virtual environment](#using-virtual-environment) | The most reliable way, but a bit more complicated to set up. |
-
-(using-system-environment)=
-## Using Python packages from your operating system
-
-Ensure your distribution provides python packages, that correspond project dependencies listed in `Pipfile`.
-
-Install all required dependencies manually via your package manager.
-
-Clone `kde-builder` to the folder where you store software (assume it is `~/.local`):
-
-```bash
-mkdir -p ~/.local/share
-cd ~/.local/share
-git clone https://invent.kde.org/sdk/kde-builder.git
-```
-
-Create a symlink to the script (assuming the `~/.local/bin` is in your `PATH`):
-
-```bash
-mkdir ~/.local/bin
-ln -sf ~/.local/share/kde-builder/kde-builder ~/.local/bin
-```
-
-Make sure it works by running:
-
-```bash
-cd ~
-kde-builder --version
-```
-
-(using-virtual-environment)=
-## Using a Python virtual environment
-
-Install pipenv.
-
-* Arch Linux: `sudo pacman -S python-pipenv`
-* Fedora 39: `sudo dnf install pipenv`
-* openSUSE Tumbleweed: not available in the repositories. You will need to install it with `pip install`.
-* Debian/Ubuntu: pipenv package seems to be broken on Ubuntu 22.04 LTS. You will need to use `pip install pipenv`.
-* KDE neon is based on Ubuntu 22.04 LTS and has Python 3.10. Instructions for KDE neon (if you want to use python 3.11):
-
-```bash
-sudo add-apt-repository ppa:deadsnakes/ppa
-sudo apt update
-sudo apt install python3.11
-
-python3.11 -m pip install --user pipenv
-# Restart the computer in order for the PATH environment variable to contain the directory "~/.local/bin".
-# Make sure that the directory "~/.local/bin" is in $PATH.
-echo $PATH
-which pipenv
-# Should say "~/.local/bin/pipenv".
-
-# For building from source code the Python module dbus-python.
-sudo apt install pkgconf cmake libdbus-1-dev libglib2.0-dev python3.11-dev
-```
-
-Clone `kde-builder` to the folder where you store software (assume it is `~/.local`):
-
-```bash
-cd ~/.local/share
-git clone https://invent.kde.org/sdk/kde-builder.git
-```
-
-Note that `Pipfile` uses python 3.10 version. That is made this way because the gitlab ci job uses it, to ensure python 3.10
-is correctly supported. If you want to use a more recent version, specify it with `--python /path/to/python`.
-
-Create a virtual environment with the required packages:
-
-```bash
-cd ~/.local/share/kde-builder
-pipenv install --python /usr/bin/python3.11 # <-- use path to interpreter you want to use
-```
-
-To be able to invoke the script by just its name, create a wrapper script.
-Create a file `~/.local/bin/kde-builder` (assuming that `~/.local/bin` is in your `PATH`). Add the following content to it:
-
-```bash
-#!/bin/bash
-pipenv run python ~/.local/share/kde-builder/kde-builder $@
-```
-
-Make the file executable:
-
-```bash
-chmod u+x ~/.local/bin/kde-builder
-```
-
-Make sure it works by running:
-
-```bash
-cd ~
-kde-builder --version
-```
-
-Add these cmake options to your config:
-
-```yaml
-global:
- cmake-options ... -DPython3_FIND_VIRTUALENV=STANDARD -DPython3_FIND_UNVERSIONED_NAMES=FIRST
-```
-
-This will let cmake find python modules from your system packages.
diff --git a/doc/getting-started/before-building.md b/doc/getting-started/before-building.md
index 5c3bc026..1a25d253 100644
--- a/doc/getting-started/before-building.md
+++ b/doc/getting-started/before-building.md
@@ -4,46 +4,33 @@
(initial-setup-of-kde-builder)=
## Initial Setup of KDE Builder
-(get-kde-builder)=
+(install-with-uv)=
### Install KDE Builder
-Before installing, configure your PATH environment variable to include the `~/.local/bin` path - the location where kde-builder will be installed.
-See [how to set environment variables](https://wiki.archlinux.org/title/Environment_variables#Per_user) for more information.
+Install `uv` utility with any way you prefer. See [official documentation](https://docs.astral.sh/uv/getting-started/installation/) for available options.
-For example, add this code to your `~/.bashrc` or `~/.zshrc`:
+You do not need to install python of any version, because uv will do it automatically inside the virtual environment.
+Run the installation command:
```bash
-export PATH="$HOME/.local/bin:$PATH"
+uv tool install git+https://invent.kde.org/sdk/kde-builder.git
```
-or, if using fish shell, you can add it by running (this stays permanent):
-
-```shell
-fish_add_path ~/.local/bin
-```
-
-```{note}
-On Debian-like distros, the default `~/.profile` automatically adds `~/.local/bin` to PATH when `~/.local/bin` exists.
-The initial_setup.sh script will automatically source the `~/.profile` file, so you do not need to additionally configure PATH.
-```
-
-You can install KDE Builder with its installation script:
+Make sure it works by running:
```bash
-cd ~
-curl 'https://invent.kde.org/sdk/kde-builder/-/raw/master/scripts/initial_setup.sh?ref_type=heads' > initial_setup.sh
-bash initial_setup.sh
+kde-builder --version
```
-The installation script will prompt to install KDE Builder's runtime dependencies,
-and do installation itself.
-
-You can update KDE Builder later by running this script again.
+Add these cmake options to your config:
-```{note}
-If for some reason you want to make installation differently, consult [](#alternative-installation).
+```yaml
+global:
+ cmake-options ... -DPython3_FIND_VIRTUALENV=STANDARD -DPython3_FIND_UNVERSIONED_NAMES=FIRST
```
+This will let cmake find python modules from your system packages.
+
(generate-rcfile)=
### Prepare the configuration file
diff --git a/doc/getting-started/index.md b/doc/getting-started/index.md
index cc5497ce..3dbcb66e 100644
--- a/doc/getting-started/index.md
+++ b/doc/getting-started/index.md
@@ -7,7 +7,7 @@ nosearch:
```{toctree}
before-building
-alternative-installation
+legacy-installation
bash-completion-setup
configure-data
building-and-troubleshooting
diff --git a/doc/getting-started/before-building.md b/doc/getting-started/legacy-installation.md
similarity index 52%
copy from doc/getting-started/before-building.md
copy to doc/getting-started/legacy-installation.md
index 5c3bc026..8e1686c4 100644
--- a/doc/getting-started/before-building.md
+++ b/doc/getting-started/legacy-installation.md
@@ -1,11 +1,5 @@
-(before-building)=
-# Installation and initial configuration
-
-(initial-setup-of-kde-builder)=
-## Initial Setup of KDE Builder
-
(get-kde-builder)=
-### Install KDE Builder
+# Install KDE Builder in a legacy way
Before installing, configure your PATH environment variable to include the `~/.local/bin` path - the location where kde-builder will be installed.
See [how to set environment variables](https://wiki.archlinux.org/title/Environment_variables#Per_user) for more information.
@@ -39,35 +33,3 @@ The installation script will prompt to install KDE Builder's runtime dependencie
and do installation itself.
You can update KDE Builder later by running this script again.
-
-```{note}
-If for some reason you want to make installation differently, consult [](#alternative-installation).
-```
-
-(generate-rcfile)=
-### Prepare the configuration file
-
-KDE Builder uses a [configuration file](./configure-data) to control
-which projects are built, where they are installed to, etc.
-
-Run this command to generate configuration file:
-
-```bash
-kde-builder --generate-config
-```
-
-The config file will be located at `~/.config/kde-builder.yaml`
-(or `$XDG_CONFIG_HOME/kde-builder.yaml`, if `$XDG_CONFIG_HOME` is set).
-
-You can then edit the `~/.config/kde-builder.yaml` configuration file to make any changes you see fit.
-
-(initial-install-distro-packages)=
-### Install the dependencies for projects
-
-Building of projects requires some packages from your distribution to be installed.
-
-Run this command to install needed dependencies:
-
-```bash
-kde-builder --install-distro-packages
-```