From 99cc773170e3a5e7a8e58fbcdc063dc429328a06 Mon Sep 17 00:00:00 2001 From: Junfeng Qiao Date: Fri, 1 Mar 2024 11:30:01 +0100 Subject: [PATCH] Fix for mkdocs-bibtex with python 3.12 Python 3.12 does not install `setuptools` in virtual env, therefore `pkg_resources` is missing but `mkdocs-bibtex` explicitly imports it. The solution is to explicitly install `setuptools` in the virtual env. See https://docs.python.org/3/whatsnew/3.12.html Co-authored-by: Cristian Le --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 818a186d..4b8520b0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -77,7 +77,10 @@ jobs: # use the latest stable version python-version: "3.x" cache: "pip" - - run: pip install -r docs/requirements.txt + # `pybtex` uses `pkg_resources` which is deprecated. Use workaround until upstream `mkdocs_bibtext`decides on a solution + # https://github.com/shyamd/mkdocs-bibtex/issues/228 + # https://bitbucket.org/pybtex-devs/pybtex/issues/169/replace-pkg_resources-with + - run: pip install -r docs/requirements.txt setuptools - run: mkdocs build --strict working-directory: ./docs env: