From 81a7b3fc8026088568e333fe3e7e1fba633a04e3 Mon Sep 17 00:00:00 2001 From: Daniel Baluta Date: Mon, 30 Jan 2023 18:09:56 +0200 Subject: [PATCH 1/5] Upgrade ubuntu Signed-off-by: Daniel Baluta --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b0c34c5246b859..29a5d96cebcf82 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ on: jobs: build_job: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 name: Build documentation steps: - name: Checkout From 366030f848be414377bc3fec78b53b8535d2b65d Mon Sep 17 00:00:00 2001 From: Daniel Baluta Date: Mon, 30 Jan 2023 18:25:47 +0200 Subject: [PATCH 2/5] python3-sphynx Signed-off-by: Daniel Baluta --- .github/workflows/main.yml | 2 +- scripts/sphinx-pre-install | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 29a5d96cebcf82..a0c09e9ccebbd9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Install native dependencies - run: sudo apt-get update -y && sudo apt-get install -y ditaa graphviz + run: sudo apt-get update -y && sudo apt-get install -y ditaa graphviz && sudo apt-get install -y python3-sphinx - name: Install pip dependencies run: sudo pip install Sphinx==1.6.7 sphinx_rtd_theme hieroglyph==1.0 - name: Build documentation diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install index 97de35728eb968..ca49779f49c183 100755 --- a/scripts/sphinx-pre-install +++ b/scripts/sphinx-pre-install @@ -1001,7 +1001,10 @@ sub check_needs() printf "\n"; printf "Hello\n"; - printf "---- %s -----", which("sphinx-build-3"); + printf "python: ---- %s -----\n", which("python"); + printf "python3: ---- %s -----\n", which("python3-sphinx"); + print "list files --- %s ----\n", `ls -al /usr/bin/python` + printf "sphinx-build-3---- %s -----\n", which("sphinx-build-3"); printf "hello\n"; print "All optional dependencies are met.\n" if (!$optional); From f74b9d9127ef86aaa2da01f7a10398352c7ec2e0 Mon Sep 17 00:00:00 2001 From: Daniel Baluta Date: Mon, 30 Jan 2023 19:05:52 +0200 Subject: [PATCH 3/5] dfadfasd Signed-off-by: Daniel Baluta --- scripts/sphinx-pre-install | 40 +++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install index ca49779f49c183..8005a961d81ede 100755 --- a/scripts/sphinx-pre-install +++ b/scripts/sphinx-pre-install @@ -964,22 +964,52 @@ sub check_needs() } } + + print "need (1) $need\n"; # Check for needed programs/tools check_perl_module("Pod::Usage", 0); + + print "need (2) $need\n"; + # Check for needed programs/tools check_program("make", 0); + + print "need (3) $need\n"; + # Check for needed programs/tools check_program("gcc", 0); + + print "need (4) $need\n"; + # Check for needed programs/tools check_python_module("sphinx_rtd_theme", 1) if (!$virtualenv); + + print "need (5) $need\n"; + # Check for needed programs/tools check_program("dot", 1); + + print "need (6) $need\n"; + # Check for needed programs/tools check_program("convert", 1); + print "need (7) $need\n"; + # Check for needed programs/tools # Extra PDF files - should use 2 for is_optional check_program("xelatex", 2) if ($pdf); + + print "need (8) $need\n"; + # Check for needed programs/tools check_program("rsvg-convert", 2) if ($pdf); + + print "need (9) $need\n"; + # Check for needed programs/tools check_program("latexmk", 2) if ($pdf); + print "need (10) $need\n"; + # Check for needed programs/tools # Do distro-specific checks and output distro-install commands check_distros(); + + print "need (11) $need\n"; + # Check for needed programs/tools if (!$python_cmd) { if ($need == 1) { die "Can't build as $need mandatory dependency is missing"; @@ -988,13 +1018,21 @@ sub check_needs() } } + + + + print "need (12) $need\n"; # Check if sphinx-build is called sphinx-build-3 if ($need_symlink) { printf "\tsudo ln -sf %s /usr/bin/sphinx-build\n\n", which("sphinx-build-3"); } + + print "need (13) $need\n"; recommend_sphinx_version($virtualenv_cmd); + + print "need (14) $need\n"; printf "\n"; print "need: $need\n"; @@ -1003,7 +1041,7 @@ sub check_needs() printf "Hello\n"; printf "python: ---- %s -----\n", which("python"); printf "python3: ---- %s -----\n", which("python3-sphinx"); - print "list files --- %s ----\n", `ls -al /usr/bin/python` + print "list files --- %s ----\n", system("ls -al /usr/bin/python"); printf "sphinx-build-3---- %s -----\n", which("sphinx-build-3"); printf "hello\n"; From d0bed830c4ee9701428497d408ba1907978251a4 Mon Sep 17 00:00:00 2001 From: Daniel Baluta Date: Tue, 31 Jan 2023 20:42:18 +0200 Subject: [PATCH 4/5] Revert "docs: sphinx/requirements: Limit jinja2<3.1" This reverts commit be78837ca3c88eebd405103a7a2ce891c466b0db. --- Documentation/sphinx/requirements.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/Documentation/sphinx/requirements.txt b/Documentation/sphinx/requirements.txt index 2c573541ab712f..9a35f50798a65f 100644 --- a/Documentation/sphinx/requirements.txt +++ b/Documentation/sphinx/requirements.txt @@ -1,4 +1,2 @@ -# jinja2>=3.1 is not compatible with Sphinx<4.0 -jinja2<3.1 sphinx_rtd_theme Sphinx==2.4.4 From 577965e6a3fc3946694cb365fe6649823ed523fe Mon Sep 17 00:00:00 2001 From: Daniel Baluta Date: Tue, 31 Jan 2023 20:42:27 +0200 Subject: [PATCH 5/5] Revert "docs: sphinx-requirements: Move sphinx_rtd_theme to top" This reverts commit 37397b092e7f4b520a257aaafe83f868cd3d5e27. --- Documentation/sphinx/requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/sphinx/requirements.txt b/Documentation/sphinx/requirements.txt index 9a35f50798a65f..489f6626de6740 100644 --- a/Documentation/sphinx/requirements.txt +++ b/Documentation/sphinx/requirements.txt @@ -1,2 +1,3 @@ -sphinx_rtd_theme +docutils Sphinx==2.4.4 +sphinx_rtd_theme