From abaa5c0b72c9f930631ff3d46b0ea51249258de3 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sun, 20 Nov 2022 19:45:26 +0000 Subject: [PATCH 1/4] Docs: update instructions to install deps with Poetry --- docs/user/build-customization.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/user/build-customization.rst b/docs/user/build-customization.rst index 18d56fa8a72..8ccabee7332 100644 --- a/docs/user/build-customization.rst +++ b/docs/user/build-customization.rst @@ -326,12 +326,12 @@ Take a look at the following example: jobs: post_create_environment: # Install poetry - # https://python-poetry.org/docs/#osx--linux--bashonwindows-install-instructions - - curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - + # https://python-poetry.org/docs/#installing-with-the-official-installer + - curl -sSL https://install.python-poetry.org | python3 - # Tell poetry to not use a virtual environment - - $HOME/.poetry/bin/poetry config virtualenvs.create false + - $HOME/.local/bin/poetry config virtualenvs.create false # Install project's dependencies - - $HOME/.poetry/bin/poetry install + - $HOME/.local/bin/poetry install sphinx: configuration: docs/conf.py From d2fdbc22e08d0eee47d6bacebc79489c76280ed5 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sun, 20 Nov 2022 21:31:25 +0000 Subject: [PATCH 2/4] Docs: fix example for installing deps with Poetry --- docs/user/build-customization.rst | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/user/build-customization.rst b/docs/user/build-customization.rst index 8ccabee7332..2f2f988beae 100644 --- a/docs/user/build-customization.rst +++ b/docs/user/build-customization.rst @@ -330,11 +330,20 @@ Take a look at the following example: - curl -sSL https://install.python-poetry.org | python3 - # Tell poetry to not use a virtual environment - $HOME/.local/bin/poetry config virtualenvs.create false - # Install project's dependencies - - $HOME/.local/bin/poetry install + pre_install: + # Export project dependencies to requirements.txt + - $HOME/.local/bin/poetry export --with docs > docs/requirements.txt 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 From ef8930274f48b15f60aad4379128f63fa19b459c Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Mon, 21 Nov 2022 09:30:17 +0000 Subject: [PATCH 3/4] 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 From 6a758a9b159958aef6e6e2a83b2311f532818139 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 22 Nov 2022 14:13:41 +0000 Subject: [PATCH 4/4] Docs: Apply suggestions from CR regarding Poetry example --- docs/user/build-customization.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/user/build-customization.rst b/docs/user/build-customization.rst index ed65eb84306..0de645309f0 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 install Poetry and ``post_install`` to install Python dependencies. +can use the ``post_create_environment`` user-defined job to use Poetry for installing Python dependencies. Take a look at the following example: @@ -326,10 +326,10 @@ Take a look at the following example: jobs: post_create_environment: # Install poetry + # https://python-poetry.org/docs/#installing-manually - pip install poetry # Tell poetry to not use a virtual environment - 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