From 3087ea13f8abd843b57d2761bfdaee6c9bf93773 Mon Sep 17 00:00:00 2001 From: Colin Goutte Date: Wed, 24 Apr 2024 11:43:58 +0200 Subject: [PATCH 1/2] Check for asciidoctor before trying to install and fix archiliunux install) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c47228c41..0cbdf7eca 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ build: $(HTML_PAGES) $(TMPDIR) .PHONY: install install: .venv/bin - which brew && brew install asciidoctor || apt install -y asciidoctor + which asciidoctor || (which brew && brew install asciidoctor || apt install -y asciidoctor || sudo pacman -S --needed asciidoctor) .PHONY: update-submodules update-submodules: From 129630ad5879d782d03395465fec57c5c36629d6 Mon Sep 17 00:00:00 2001 From: Colin Goutte Date: Fri, 17 May 2024 23:17:22 +0200 Subject: [PATCH 2/2] Workaround for en_GB locale issue. Installing le locale instead of trying to convert to any possible locale --- tests/test_system_requirements.py | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/test_system_requirements.py diff --git a/tests/test_system_requirements.py b/tests/test_system_requirements.py new file mode 100644 index 000000000..d2ba5de73 --- /dev/null +++ b/tests/test_system_requirements.py @@ -0,0 +1,36 @@ +import unittest +from sourcetree import ( + SourceTree, +) + + +class RequirementTestCase(unittest.TestCase): + def test_en_GB_locale_is_installed(self): + sourcetree = SourceTree() + + locales = sourcetree.run_command("locale -a").split("\n") + # debian sudo locale-gen en_GB.UTF-8 && sudo update-locale + # arch : https://wiki.archlinux.org/title/locale + # uncomment en_GB.UTF-8 + + # cd /etc && sudo git diff 3 i have etckeeper installed + """ + diff --git a/locale.gen b/locale.gen + index 2f21f03..210ee98 100644 + --- a/locale.gen + +++ b/locale.gen + @@ -157,7 +157,7 @@ + #en_CA ISO-8859-1 + #en_DK.UTF-8 UTF-8 + #en_DK ISO-8859-1 + -#en_GB.UTF-8 UTF-8 + +en_GB.UTF-8 UTF-8 + #en_GB ISO-8859-1 + #en_HK.UTF-8 UTF-8 + #en_HK ISO-8859-1 + """ + + assert ( + "en_GB.utf8" in locales, + "Lacking en_GB locale. " "This interferes with checks for output.", + )