From 0ff432772976eb422c77cc57f4ea6107cc2691d2 Mon Sep 17 00:00:00 2001 From: Robert Winkler Date: Tue, 24 Nov 2020 19:09:30 +0100 Subject: [PATCH 1/3] docs: Fix links generation for markdown-code-symlinks Signed-off-by: Robert Winkler --- docs/Makefile | 2 +- docs/conf.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 103b5e17..21bd156e 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -69,5 +69,5 @@ links: fuzzers-links minitests-links # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile links +%: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/conf.py b/docs/conf.py index d7cbee0f..7e8d7c0f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -30,6 +30,8 @@ import recommonmark # import os import sys +import subprocess + sys.path.insert(0, os.path.abspath('.')) from markdown_code_symlinks import LinkParser, MarkdownSymlinksDomain @@ -86,7 +88,6 @@ if not on_rtd: else: docs_dir = os.path.abspath(os.path.dirname(__file__)) print("Docs dir is:", docs_dir) - import subprocess subprocess.call('git fetch origin --unshallow', cwd=docs_dir, shell=True) subprocess.check_call('git fetch origin --tags', cwd=docs_dir, shell=True) subprocess.check_call('make links', cwd=docs_dir, shell=True) @@ -268,6 +269,9 @@ intersphinx_mapping = {'https://docs.python.org/': None} def setup(app): + # Generate links for markdown-code-symlinks + subprocess.check_call("make links", shell=True) + github_code_repo = 'https://github.com/SymbiFlow/prjxray/' github_code_branch = 'blob/master/' From 82309c0aa397662eca82191f2a191f04e31972b7 Mon Sep 17 00:00:00 2001 From: Robert Winkler Date: Tue, 1 Dec 2020 16:42:10 +0100 Subject: [PATCH 2/3] docs: Add recommonmark to extension list Signed-off-by: Robert Winkler --- docs/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 7e8d7c0f..d9ac409e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -53,7 +53,8 @@ extensions = [ 'sphinx.ext.imgmath', 'sphinx.ext.napoleon', 'sphinx.ext.todo', - 'sphinx_markdown_tables' + 'sphinx_markdown_tables', + 'recommonmark' ] # yapf: enable From 310292cf58d4213c24b647218e6fa6273b6230c4 Mon Sep 17 00:00:00 2001 From: Robert Winkler Date: Tue, 1 Dec 2020 16:43:33 +0100 Subject: [PATCH 3/3] docs: Force Sphinx version higher or equal to 3.0 Signed-off-by: Robert Winkler --- docs/conf.py | 2 +- docs/requirements.txt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index d9ac409e..d302154a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -39,7 +39,7 @@ from markdown_code_symlinks import LinkParser, MarkdownSymlinksDomain # If your documentation needs a minimal Sphinx version, state it here. # -# needs_sphinx = '1.0' +needs_sphinx = '3.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom diff --git a/docs/requirements.txt b/docs/requirements.txt index 05e7456d..622ee486 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,8 +1,7 @@ sphinx_materialdesign_theme docutils -# Disabling direct sphinx because of https://github.com/pypa/pip/issues/9031 -# sphinx +sphinx>=3.0 sphinx-autobuild breathe