dev-pyton/sphinxcontrib-katex: fix build USE="doc"; switch toml->tomli

Closes: https://bugs.gentoo.org/934950

Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
This commit is contained in:
Sergey Torokhov
2024-08-11 01:36:12 +03:00
parent 883718f5d8
commit c2b1ca2c9a
2 changed files with 26 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
Gentoo issue: https://bugs.gentoo.org/934950
Switch to use tomli instead of toml
diff '--color=auto' -Naur a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -3,13 +3,14 @@
import os
import subprocess
-import toml
+import tomli
import sphinxcontrib.katex as katex
# -- GENERAL -------------------------------------------------------------
-config = toml.load(os.path.join("..", "pyproject.toml"))
+with open("../pyproject.toml", "rb") as f:
+ config = tomli.load(f)
project = config["project"]["name"]
author = ", ".join(author["name"] for author in config["project"]["authors"])