Skip to content

Commit

Permalink
readthedocs: fix requirements
Browse files Browse the repository at this point in the history
* The list of required packages is extended.
* A handler to fix wrong html generation of index.html is added.

Signed-off-by: Juergen Repp <juergen_repp@web.de>
  • Loading branch information
JuergenReppSIT committed Dec 5, 2024
1 parent 6e2ab7b commit 274c6f8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
23 changes: 23 additions & 0 deletions sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# serve to show the default.

import subprocess
import os

# Create (unused) root file
with open("index.rst", "w") as index_rst:
Expand Down Expand Up @@ -306,3 +307,25 @@

# If true, do not generate a @detailmenu in the "Top" node's menu.
# texinfo_no_detailmenu = False

# -- Extension configuration -------------------------------------------------

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]


def builder_finished_handler(app, exception):
if exception is None:
os.environ["SPHINX_OUTDIR"] = str(app.outdir)
script = os.path.join(app.confdir, "sphinx-finished.sh")
subprocess.check_call(script, shell=True)


#
# Hook the setup of readthedocs so we can hook into events as defined in:
# - https://www.sphinx-doc.org/en/master/extdev/appapi.html
#
def setup(app):
app.connect("build-finished", builder_finished_handler)
12 changes: 12 additions & 0 deletions sphinx/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
setuptools_scm[toml]>=3.4.3
cffi>=1.0.0
pkgconfig
cryptography>=3.0
asn1crypto
packaging
pycparser
cffi>=1.0.0
asn1crypto
cryptography>=3.0
packaging
pyyaml
# needed for readthedocs builds:
GitPython
myst_parser
Expand Down

0 comments on commit 274c6f8

Please sign in to comment.