Skip to content

Commit

Permalink
Fix for mkdocs-bibtex with python 3.12
Browse files Browse the repository at this point in the history
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@lecris.me>
  • Loading branch information
qiaojunfeng and LecrisUT committed Mar 1, 2024
1 parent 7e39f1b commit 99cc773
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 99cc773

Please sign in to comment.