Skip to content

Commit

Permalink
[docs] fix docs build on Py<3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
cverstege committed Dec 19, 2023
1 parent b53563c commit 3a33ea0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion doc/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@
print('kafe2 version:', kafe2.__version__)

# import the information which is already in the pyproject.toml
import tomllib
try:
import tomllib # Only Py>=3.11
except ModuleNotFoundError:
import tomli as tomllib

with open("../../pyproject.toml", "rb") as f:
toml = tomllib.load(f)

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ dev = [
"black",
"isort",
"build",
"twine",
"twine",
"tomli", # required for Py<3.11, otherwise tomllib is present
]

[project.urls]
Expand Down

0 comments on commit 3a33ea0

Please sign in to comment.