From 275de6249de51322d41baa75ef15ce45847b2348 Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Mon, 6 May 2024 16:42:34 +0200 Subject: [PATCH] drop our sphinx patch Fixed by https://github.com/sphinx-doc/sphinx/pull/11766 --- .woodpecker/epub.yml | 2 -- Dockerfile | 1 - book/patches/sphinx-11766.patch | 26 -------------------------- 3 files changed, 29 deletions(-) delete mode 100644 book/patches/sphinx-11766.patch diff --git a/.woodpecker/epub.yml b/.woodpecker/epub.yml index 57dad7b..8ae02fe 100644 --- a/.woodpecker/epub.yml +++ b/.woodpecker/epub.yml @@ -19,6 +19,4 @@ steps: commands: - pacman -Sy --needed --noconfirm archlinux-keyring - pacman -Syu --needed --noconfirm epubcheck inkscape noto-fonts make patch python-myst-parser python-sphinx python-sphinxext-opengraph python-sphinx-sitemap ttf-montserrat - # fix sphinx: https://github.com/sphinx-doc/sphinx/issues/11598 - - patch -Np1 -d /usr/lib/python3.11/site-packages/ -i "$(pwd)/book/patches/sphinx-11766.patch" - make -C book epub-check diff --git a/Dockerfile b/Dockerfile index 419bbac..a7ee07b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,6 @@ WORKDIR /book RUN \ pacman -Sy --needed --noconfirm archlinux-keyring \ && pacman -Syu --needed --noconfirm inkscape make noto-fonts patch python-myst-parser python-sphinx python-sphinxext-opengraph python-sphinx-sitemap ttf-montserrat \ - && patch -Np1 -d /usr/lib/python3.11/site-packages/ -i /book/patches/sphinx-11766.patch \ && make epub html FROM scratch diff --git a/book/patches/sphinx-11766.patch b/book/patches/sphinx-11766.patch deleted file mode 100644 index c507523..0000000 --- a/book/patches/sphinx-11766.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/sphinx/builders/html/__init__.py b/sphinx/builders/html/__init__.py -index 85067be0178..91d3647597c 100644 ---- a/sphinx/builders/html/__init__.py -+++ b/sphinx/builders/html/__init__.py -@@ -1061,7 +1061,9 @@ def css_tag(css: _CascadingStyleSheet) -> str: - attrs.append(f'{key}="{html.escape(value, quote=True)}"') - uri = pathto(os.fspath(css.filename), resource=True) - if checksum := _file_checksum(outdir, css.filename): -- uri += f'?v={checksum}' -+ # the EPUB format does not allow the use of query components -+ if self.name != 'epub': -+ uri += f'?v={checksum}' - return f'' - - ctx['css_tag'] = css_tag -@@ -1092,7 +1094,9 @@ def js_tag(js: _JavaScript | str) -> str: - # https://github.com/sphinx-doc/sphinx/issues/11658 - pass - elif checksum := _file_checksum(outdir, js.filename): -- uri += f'?v={checksum}' -+ # the EPUB format does not allow the use of query components -+ if self.name != 'epub': -+ uri += f'?v={checksum}' - if attrs: - return f'' - return f''