Skip to content

Commit

Permalink
Merge 877bf6e into ac36e97
Browse files Browse the repository at this point in the history
  • Loading branch information
repo-helper[bot] committed Jun 28, 2024
2 parents ac36e97 + 877bf6e commit 9ac9270
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- {python-version: "pypy-3.6", testenvs: "pypy36", experimental: False}
- {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: False}
- {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: False}
- {python-version: "pypy-3.9", testenvs: "pypy39,build", experimental: True}
- {python-version: "pypy-3.9-v7.3.15", testenvs: "pypy39,build", experimental: True}

steps:
- name: Checkout 🛎️
Expand Down
17 changes: 16 additions & 1 deletion doc-source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,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")
Expand Down
6 changes: 6 additions & 0 deletions doc-source/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.1.6
toctree-plus>=0.6.1

0 comments on commit 9ac9270

Please sign in to comment.