Skip to content

Commit

Permalink
dev-pyton/sphinxcontrib-katex: fix build USE="doc"; switch toml->tomli
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/934950

Signed-off-by: Sergey Torokhov <[email protected]>
  • Loading branch information
band-a-prend committed Aug 10, 2024
1 parent 883718f commit c2b1ca2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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"])
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ RDEPEND=">=dev-python/sphinx-4.5.0-r1[${PYTHON_USEDEP}]"

DOCS=()

PATCHES="${FILESDIR}/${P}_fix_install.patch"
PATCHES="
${FILESDIR}/${P}_fix_install.patch
${FILESDIR}/${P}_fix_use_tomli.patch
"

distutils_enable_sphinx docs \
dev-python/insipid-sphinx-theme \
Expand Down

0 comments on commit c2b1ca2

Please sign in to comment.