From ab820fe8a0698231539992f3b4013c23dc42b259 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 16 Aug 2023 17:02:02 +0200 Subject: ci: Set up asciidoc properly for releases --- .github/workflows/release.yml | 3 ++- misc/Makefile | 3 ++- scripts/dev/build_release.py | 12 ++++++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 309b59392..1323ce605 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -139,11 +139,12 @@ jobs: # - qutebrowser/browser/webengine/spell.py # - utils.message -> utils.usertypes -> utils.qtutils -> qt.gui # - PyQt6.QtGui + # Some additional packages are needed for a2x to build manpage - name: Install apt dependencies if: ${{ startsWith(matrix.os, 'ubuntu-') }} run: | sudo apt-get update - sudo apt-get install --no-install-recommends libegl1-mesa + sudo apt-get install --no-install-recommends libegl1-mesa libxml2-utils docbook-xml xsltproc docbook-xsl - name: Install dependencies run: | python -m pip install -U pip diff --git a/misc/Makefile b/misc/Makefile index 62294ba61..39a7e005f 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -4,6 +4,7 @@ ICONSIZES = 16 24 32 48 64 128 256 512 DATAROOTDIR = $(PREFIX)/share DATADIR ?= $(DATAROOTDIR) MANDIR ?= $(DATAROOTDIR)/man +A2X ?= a2x ifdef DESTDIR SETUPTOOLSOPTS = --root="$(DESTDIR)" @@ -14,7 +15,7 @@ all: man man: doc/qutebrowser.1 doc/qutebrowser.1: doc/qutebrowser.1.asciidoc - a2x -f manpage $< + $(A2X) -f manpage $< install: man $(PYTHON) setup.py install --prefix="$(PREFIX)" --optimize=1 $(SETUPTOOLSOPTS) diff --git a/scripts/dev/build_release.py b/scripts/dev/build_release.py index 2038a7f67..d16e24866 100755 --- a/scripts/dev/build_release.py +++ b/scripts/dev/build_release.py @@ -518,9 +518,17 @@ def build_sdist() -> List[Artifact]: def test_makefile() -> None: """Make sure the Makefile works correctly.""" utils.print_title("Testing makefile") + a2x_path = pathlib.Path(sys.executable).parent / 'a2x' + assert a2x_path.exists(), a2x_path with tempfile.TemporaryDirectory() as tmpdir: - subprocess.run(['make', '-f', 'misc/Makefile', - f'DESTDIR={tmpdir}', 'install'], check=True) + subprocess.run( + [ + 'make', '-f', 'misc/Makefile', + f'DESTDIR={tmpdir}', f'A2X={a2x_path}', + 'install' + ], + check=True, + ) def read_github_token( -- cgit v1.2.3-54-g00ecf