From ef8930274f48b15f60aad4379128f63fa19b459c Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Mon, 21 Nov 2022 09:30:17 +0000 Subject: [PATCH] Docs: simplify Poetry example --- docs/user/build-customization.rst | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/docs/user/build-customization.rst b/docs/user/build-customization.rst index 2f2f988beae..ed65eb84306 100644 --- a/docs/user/build-customization.rst +++ b/docs/user/build-customization.rst @@ -310,7 +310,7 @@ Install dependencies with Poetry ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Projects managed with `Poetry `__, -can use the ``post_create_environment`` user-defined job to use Poetry for installing Python dependencies. +can use the ``post_create_environment`` user-defined job to install Poetry and ``post_install`` to install Python dependencies. Take a look at the following example: @@ -326,24 +326,16 @@ Take a look at the following example: jobs: post_create_environment: # Install poetry - # https://python-poetry.org/docs/#installing-with-the-official-installer - - curl -sSL https://install.python-poetry.org | python3 - + - pip install poetry # Tell poetry to not use a virtual environment - - $HOME/.local/bin/poetry config virtualenvs.create false - pre_install: - # Export project dependencies to requirements.txt - - $HOME/.local/bin/poetry export --with docs > docs/requirements.txt + - poetry config virtualenvs.create false + post_install: + # Install dependencies with 'docs' dependency group + # https://python-poetry.org/docs/managing-dependencies/#dependency-groups + - poetry install --with docs sphinx: configuration: docs/conf.py - - python: - install: - # Install exported dependencies - - requirements: docs/requirements.txt - # Optional: install current package if imported from `docs/conf.py` - - method: pip - path: . Override the build process