From b87e1e27f846692b2b1df770b8dfac181520407c Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Fri, 28 Jun 2024 11:29:25 +0100 Subject: [PATCH] Updated files with 'repo_helper'. --- doc-source/conf.py | 17 ++++++++++++++++- doc-source/requirements.txt | 6 ++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/doc-source/conf.py b/doc-source/conf.py index 514abdb..a702401 100644 --- a/doc-source/conf.py +++ b/doc-source/conf.py @@ -68,13 +68,28 @@ } +# Fix for pathlib issue with sphinxemoji on Python 3.9 and Sphinx 4.x +def copy_asset_files(app, exc): + # 3rd party + from domdf_python_tools.compat import importlib_resources + from sphinx.util.fileutil import copy_asset + + if exc: + return + + asset_files = ["twemoji.js", "twemoji.css"] + for path in asset_files: + path_str = os.fspath(importlib_resources.files("sphinxemoji") / path) + copy_asset(path_str, os.path.join(app.outdir, "_static")) + + def setup(app): # 3rd party from sphinx_toolbox.latex import better_header_layout from sphinxemoji import sphinxemoji app.connect("config-inited", lambda app, config: better_header_layout(config)) - app.connect("build-finished", sphinxemoji.copy_asset_files) + app.connect("build-finished", copy_asset_files) app.add_js_file("https://unpkg.com/twemoji@latest/dist/twemoji.min.js") app.add_js_file("twemoji.js") app.add_css_file("twemoji.css") diff --git a/doc-source/requirements.txt b/doc-source/requirements.txt index 77c24b8..038b9f0 100644 --- a/doc-source/requirements.txt +++ b/doc-source/requirements.txt @@ -14,6 +14,12 @@ sphinx-prompt>=1.1.0 sphinx-pyproject>=0.1.0 sphinx-tabs>=1.1.13 sphinx-toolbox>=3.5.0 +sphinxcontrib-applehelp==1.0.4 +sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-httpdomain>=1.7.0 +sphinxcontrib-jsmath==1.0.1 +sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-serializinghtml==1.1.5 sphinxemoji>=0.2.0 toctree-plus>=0.6.1