From a2ccc2ca89068247a798164fd71b723b6a736679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dachary?= Date: Fri, 5 Feb 2021 16:04:53 +0100 Subject: [PATCH] doc: instructions to setup a development environment (#50921) License: MIT --- doc/development.rst | 52 +++++++++++++++++++++++++++++++++++++++++++++ doc/index.rst | 2 ++ 2 files changed, 54 insertions(+) create mode 100644 doc/development.rst diff --git a/doc/development.rst b/doc/development.rst new file mode 100644 index 000000000..520c5319d --- /dev/null +++ b/doc/development.rst @@ -0,0 +1,52 @@ +.. _development: + +=========== +Development +=========== + +Get the code and the dependencies +================================= + +1. Clone the repository:: + + $ git clone https://git.entrouvert.org/authentic.git + +2. Install `lasso `_ python packages:: + + $ curl https://deb.entrouvert.org/entrouvert.gpg | sudo apt-key add - + $ echo deb http://deb.entrouvert.org/ buster main | \ + sudo tee /etc/apt/sources.list.d/entrouvert.list + $ sudo apt-get update + $ sudo apt-get install python-lasso python3-lasso + +3. Install dependencies:: + + $ sudo apt-get install postgresql build-essential gettext sassc \ + libldap2-dev libsasl2-dev python3-dev + +Run the tests +============= + +1. Setup a virtualenv:: + + $ sudo apt-get install direnv + $ echo layout python3 > authentic/.envrc + $ direnv allow authentic + $ cd authentic + +2. Run:: + + $ pip install tox + $ pg_virtualenv tox + +Build the documentation +======================= + +1. Build:: + + $ pip install sphinx + $ sphinx-build -b html doc build/html + +2. Display:: + + $ firefox build/html/index.html diff --git a/doc/index.rst b/doc/index.rst index d9786bf2a..a2331f3f0 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -36,6 +36,8 @@ please report it on the list. advanced + development + copyright This documentation is under the licence Creative Commons `CC BY-SA 2.0 `_.