From e83f1e5caf9952656c3afc1313fd41a41a91b8ee Mon Sep 17 00:00:00 2001 From: Alex Lutay <1928266+taurus-forever@users.noreply.github.com> Date: Thu, 11 Apr 2024 19:10:59 +0200 Subject: [PATCH] Apply reviewers recomendations --- CONTRIBUTING.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6407ab98aa..f92d9e901c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,16 +41,18 @@ tox # runs 'lint' and 'unit' environments ## Build charm The build environment assumes that there are preinstalled on the system: -* [tox](https://tox.wiki/) +* [tox](https://tox.wiki/) (version 4+ !!!) * [poetry](https://python-poetry.org/) * [charmcraft](https://snapcraft.io/charmcraft) * [charmcraftcache](https://pypi.org/project/charmcraftcache/) * [pipx](https://python.land/virtual-environments/pipx) -* [libpq-dev](https://pypi.org/project/libpq-dev/) +* [libpq-dev](https://www.postgresql.org/docs/current/libpq.html) To build the charm it is also necessary at least 5GB if free disk space and it is recommended to provide 4+ CPU cores and 8GB+ RAM for a decent build speed. + + To install all above build dependencies (assuming you are on Ubuntu 22.04 LTS): ```shell @@ -61,6 +63,9 @@ lxd init --auto # init LXD (if never used earlier) sudo apt update && sudo apt install --yes libpq-dev pipx +sudo apt purge tox # if old tox version is installed from apt + +pipx install tox pipx install poetry pipx install charmcraftcache pipx ensurepath @@ -71,13 +76,6 @@ Ensure local pip binaries are in your $PATH (otherwise re-login to your shell): charmcraftcache --help ``` -Make sure the install tox version is 4+ (using `tox --version`), if missing OR -the previos version installed as debian package (topical for Ubuntu 22.04 LTS): -purge it and install from pip: -```shell -sudo apt purge tox && pipx install tox && tox --version -``` - Build the charm (inside this Git repository): ```shell