diff --git a/.github/scripts/docs-build-deploy b/.github/scripts/docs-build-deploy index 3b94fdc1b..0c716e22c 100755 --- a/.github/scripts/docs-build-deploy +++ b/.github/scripts/docs-build-deploy @@ -9,9 +9,10 @@ set -ev export "SITE_URL_FOR_MKDOCS=$1"; shift -# https://github.com/python-poetry/poetry/issues/1917 +# https://github.com/python-poetry/poetry/issues/1917 and +# https://github.com/python-poetry/poetry/issues/8623 export PYTHON_KEYRING_BACKEND=keyring.backends.fail.Keyring -poetry install # Only really needed once per environment unless there are updates +poetry install --no-root # Only really needed once per environment unless there are updates # TODO(ilyagr): The new default "alias-type" is symlink, we should consider # switching to it. poetry run -- mike deploy --alias-type redirect "$@" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7df650783..e2e0d65c8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -75,7 +75,7 @@ jobs: with: poetry-version: latest - name: Install dependencies - run: poetry install + run: poetry install --no-root - name: Check that `mkdocs` can build the docs run: poetry run -- mkdocs build --strict diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33a33aca2..a5fd4ceab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -91,7 +91,7 @@ jobs: poetry-version: latest - name: Compile docs and zip them up run: | - poetry install + poetry install --no-root poetry run -- mkdocs build -f mkdocs-offline.yml archive="jj-${{ github.event.release.tag_name }}-docs-html.tar.gz" tar czf "$archive" -C "rendered-docs" . diff --git a/docs/contributing.md b/docs/contributing.md index c6807656d..aecddc099 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -191,13 +191,16 @@ Once you have `poetry` installed, you should ask it to install the rest of the required tools into a virtual environment as follows: ```shell -poetry install +# --no-root avoids a harmless error message starting with Poetry 1.7 +poetry install --no-root ``` -If you get requests to "unlock a keyring" or error messages about failing to do -so, this is a [known `poetry` -bug](https://github.com/python-poetry/poetry/issues/1917). The workaround is to -run the following and then to try `poetry install` again: +You may get requests to "unlock a keyring", [an error messages about failing to +do so](https://github.com/python-poetry/poetry/issues/1917), or, in the case of +Poetry 1.7, it may [simply hang +indefinitely](https://github.com/python-poetry/poetry/issues/8623). The +workaround is to either to unlock the keyring or to run the following, and then +to try `poetry install --no-root` again: ```shell # For sh-compatible shells or recent versions of `fish`