From da4324840619e8bceeadda1ac600a2747c68912b Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Tue, 1 Nov 2022 12:42:09 +0100 Subject: [PATCH] doc: Introduce pipx installation (#188) Merge libsodium, pipx installations for Debian, Fedora, macOS Keep pip installation --- README.md | 7 +-- doc/install_pip.md | 81 ---------------------------- doc/install_pipx.md | 126 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 130 insertions(+), 84 deletions(-) delete mode 100644 doc/install_pip.md create mode 100644 doc/install_pipx.md diff --git a/README.md b/README.md index 33db7152..231d7e8a 100644 --- a/README.md +++ b/README.md @@ -22,12 +22,13 @@ Powerfull, lightweight, and multi-platform command line client written with Pyth Install with your favorite package manager. See below the [packaging status paragraph](#packaging-status). -### Pip +### Pipx -If you want a more recent version [install with Pip](doc/install_pip.md): +If you want a more recent version [install with pipx](doc/install_pipx.md): ```bash -pip3 install silkaj --user +sudo apt install pipx +pipx install silkaj ``` ### Docker images diff --git a/doc/install_pip.md b/doc/install_pip.md deleted file mode 100644 index b8d83bad..00000000 --- a/doc/install_pip.md +++ /dev/null @@ -1,81 +0,0 @@ -# Install Silkaj with Pip - -You have to use a shell on Unix system. - -## GNU/Linux/BSD - -### Install libsodium - -```bash -sudo apt install libsodium23 # Debian Buster -sudo dnf install libsodium # Fedora -``` - -### Install dependencies before installing - -```bash -sudo apt install python3-pip python3-dev python3-wheel libssl-dev -``` - -On Ubuntu (14.04 and 16.04) and Debian 8, you need this package too: - -```bash -sudo apt install libffi-dev -``` - -### Completing `PATH` - -After intallation, if you get a `bash: silkaj: command not found` error, you should add `~/.local/bin` to your `PATH`: - -```bash -echo "export PATH=$PATH:$HOME/.local/bin" >> $HOME/.bashrc -source $HOME/.bashrc -``` - -## macOS - -To install Python, run the following command: - -```bash -brew install python3 -``` - -`pip3` will automatically be installed with `python3` installation. - -Then, install Silkaj with: - -```bash -pip3 install silkaj --user -``` - -## Install from PyPI - -Assuming that Python and `pip` are installed and available. You can check with: - -```bash -pip3 --version -``` - -### Install for current user only - -```bash -pip3 install silkaj --user -``` - -### Upgrade - -```bash -pip3 install silkaj --user --upgrade -``` - -### Uninstall (useful to see the real paths) - -```bash -pip3 uninstall silkaj --user -``` - -### Check Silkaj is working - -```bash -silkaj -``` diff --git a/doc/install_pipx.md b/doc/install_pipx.md new file mode 100644 index 00000000..80095e56 --- /dev/null +++ b/doc/install_pipx.md @@ -0,0 +1,126 @@ +# Install Silkaj with pipx + +By installing Silkaj with `pipx` or `pip` from PyPI, you get latest Silkaj version +which might not already be available into your favorite OS. + +You have to use a shell on Unix system. + +## Unix + +### Install libsodium + +```bash +# Debian +sudo apt install libsodium23 + +# Fedora +sudo dnf install libsodium + +# macOS +brew install libsodium +``` + +### Install `pipx` + +Check [`pipx` documentation](https://pypa.github.io/pipx/) for an extended installation tutorial. + +```bash +# Debian +sudo apt install pipx python3-dev + +# Fedora +sudo dnf install pipx python3-devel + +# macOS +brew install python3 pipx +``` + +Following packages might be necessary: + +```bash +sudo apt install libffi-dev python3-wheel libssl-dev +``` + +## Install with pipx + +[pipx](https://pypa.github.io/pipx/) tool is recommended for Python executables. +It also seperate libraries into virtual environments. + +### Ensure path + +```bash +pipx ensurepath +``` + +### Install + +```bash +pipx install silkaj +``` + +### Upgrade + +```bash +pipx upgrade silkaj +``` + +### Uninstall + +```bash +pipx uninstall silkaj +``` + +### Check Silkaj is working + +```bash +silkaj +``` + +______________________________________________________________________ + +## Install with pip + +### Install `pip` + +```bash +# Debian +sudo apt install python3-pip + +# Fedora +sudo dnf install python3-pip + +# macOS: already installed with python3 +``` + +### Completing `PATH` + +After intallation, if you get a `bash: silkaj: command not found` error, you should add `~/.local/bin` to your `PATH`: + +```bash +echo "export PATH=$PATH:$HOME/.local/bin" >> $HOME/.bashrc +source $HOME/.bashrc +``` + +### Install for current user only + +```bash +pip3 install silkaj --user +``` + +### Upgrade + +```bash +pip3 install silkaj --user --upgrade +``` + +### Uninstall (useful to see the real paths) + +```bash +pip3 uninstall silkaj --user +``` + +### Check Silkaj is working + +```bash +silkaj +``` -- GitLab