Use CVE and CWE roles from Sphinx 8.1

This commit is contained in:
Hugo van Kemenade 2024-10-10 21:35:48 +03:00
parent 97438cb8fd
commit fdd5d0c0fb
4 changed files with 3 additions and 7 deletions

View File

@ -17,12 +17,10 @@ coverage:
.PHONY: doc .PHONY: doc
.PHONY: html .PHONY: html
doc html: doc html:
python3 -c "import PIL" > /dev/null 2>&1 || python3 -m pip install .
$(MAKE) -C docs html $(MAKE) -C docs html
.PHONY: htmlview .PHONY: htmlview
htmlview: htmlview:
python3 -c "import PIL" > /dev/null 2>&1 || python3 -m pip install .
$(MAKE) -C docs htmlview $(MAKE) -C docs htmlview
.PHONY: doccheck .PHONY: doccheck

View File

@ -46,7 +46,7 @@ clean:
-rm -rf $(BUILDDIR)/* -rm -rf $(BUILDDIR)/*
install-sphinx: install-sphinx:
$(PYTHON) -m pip install --quiet furo olefile sphinx sphinx-copybutton sphinx-inline-tabs sphinxext-opengraph $(PYTHON) -m pip install -e ..[docs]
.PHONY: html .PHONY: html
html: html:

View File

@ -22,7 +22,7 @@ import PIL
# -- General configuration ------------------------------------------------ # -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here. # If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = "7.3" needs_sphinx = "8.1"
# Add any Sphinx extension module names here, as strings. They can be # Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
@ -338,8 +338,6 @@ linkcheck_allowed_redirects = {
# https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html # https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html
_repo = "https://github.com/python-pillow/Pillow/" _repo = "https://github.com/python-pillow/Pillow/"
extlinks = { extlinks = {
"cve": ("https://www.cve.org/CVERecord?id=CVE-%s", "CVE-%s"),
"cwe": ("https://cwe.mitre.org/data/definitions/%s.html", "CWE-%s"),
"issue": (_repo + "issues/%s", "#%s"), "issue": (_repo + "issues/%s", "#%s"),
"pr": (_repo + "pull/%s", "#%s"), "pr": (_repo + "pull/%s", "#%s"),
"pypi": ("https://pypi.org/project/%s/", "%s"), "pypi": ("https://pypi.org/project/%s/", "%s"),

View File

@ -43,7 +43,7 @@ dynamic = [
optional-dependencies.docs = [ optional-dependencies.docs = [
"furo", "furo",
"olefile", "olefile",
"sphinx>=7.3", "sphinx>=8.1",
"sphinx-copybutton", "sphinx-copybutton",
"sphinx-inline-tabs", "sphinx-inline-tabs",
"sphinxext-opengraph", "sphinxext-opengraph",