From 06cee474db19c269a739d55835623eec3334b847 Mon Sep 17 00:00:00 2001
From: Moul <moul@moul.re>
Date: Sat, 8 Jun 2019 15:04:58 +0200
Subject: [PATCH] [doc] #182: Document Poetry installation and usage

---
 README.md             |  1 +
 doc/install_poetry.md | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 doc/install_poetry.md

diff --git a/README.md b/README.md
index feb6d3f1..6924d7eb 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,7 @@ pip3 install silkaj --user
 
 - [Install with Pip](doc/install_pip.md)
 - [Install with pipenv](doc/install_pipenv.md)
+- [Install the Development environment](doc/install_poetry.md)
 - [Install with the build](doc/install_build.md)
 - [Install with docker](doc/install_docker.md)
 - [Build an executable with Pyinstaller](doc/build_with_pyinstaller.md)
diff --git a/doc/install_poetry.md b/doc/install_poetry.md
new file mode 100644
index 00000000..c94b4b93
--- /dev/null
+++ b/doc/install_poetry.md
@@ -0,0 +1,33 @@
+## Install Silkaj in a development environement with Poetry
+
+### Install libsodium
+
+```bash
+sudo apt install libsodium23 # Debian Buster
+sudo apt install libsodium18 # Debian Stretch
+sudo dnf install libsodium # Fedora
+```
+
+### Install Poetry
+- [Installation documentation](https://poetry.eustace.io/docs/#installation)
+
+### Install dependencies and the Python environment
+```bash
+poetry install
+```
+
+### Run Silkaj
+Within `silkaj` repository, enter the development environement and run Silkaj:
+```bash
+poetry shell
+./bin/silkaj
+```
+
+You might need to enter Poetry shell to access development tools such as `pytest` or `black`.
+
+### Make Silkaj accessible from everywhere
+
+Add following alias to your shell configuration:
+```bash
+alias silkaj "$HOME/silkaj/silkaj && poetry run silkaj"
+```
-- 
GitLab