diff --git a/.github/scripts/docs-build-deploy b/.github/scripts/docs-build-deploy index 3b94fdc1bb..0c716e22c1 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 7df650783b..e2e0d65c89 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 33a33aca29..a5fd4ceab9 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 b3c8cd91df..dc9fc2d9a4 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -184,13 +184,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`