From b6a6bd488b05c0f6d74c55f1ca28e3b4b936bdc8 Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Apr 13 2022 10:31:05 +0000 Subject: Avoid build dependency on readthedocs-sphinx-ext --- diff --git a/python-sphinx_rtd_theme.spec b/python-sphinx_rtd_theme.spec index c859f7a..0f628ea 100644 --- a/python-sphinx_rtd_theme.spec +++ b/python-sphinx_rtd_theme.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 1.0.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Sphinx theme for readthedocs.org License: MIT @@ -31,7 +31,6 @@ BuildRequires: %{py3_dist setuptools} BuildRequires: %{py3_dist wheel} %if %{without bootstrap} BuildRequires: %{py3_dist pytest} -BuildRequires: %{py3_dist readthedocs-sphinx-ext} BuildRequires: %{py3_dist sphinx} BuildRequires: %{py3_dist sphinxcontrib-httpdomain} BuildRequires: python-sphinx-doc @@ -75,6 +74,13 @@ sed -e "s|\('https://docs\.readthedocs\.io/en/stable/', \)None|\1'%{SOURCE1}'|" -e "s|\('https://www\.sphinx-doc\.org/en/master/', \)None|\1'%{_docdir}/python-sphinx-doc/html/objects.inv'|" \ -i docs/conf.py +# We modify the tests to avoid dependency on readthedocs-sphinx-ext. +# According to upstream, the test dependency is only used to test integration with that dependency. +# See https://github.com/readthedocs/readthedocs-sphinx-ext/pull/105#pullrequestreview-928253285 +sed -Ei -e "/extensions\.append\('readthedocs_ext\.readthedocs'\)/d" \ + -e "s/'readthedocs[^']*'(, ?)?//g" \ + tests/util.py + # We patch the theme css files to unbundle fonts (they are required from Fedora) # Using Web Assets shall support the use case when documentation is # exported via web server @@ -174,6 +180,9 @@ rm docs/build/html/.buildinfo %endif %changelog +* Wed Apr 13 2022 Miro Hrončok - 1.0.0-4 +- Avoid build dependency on readthedocs-sphinx-ext + * Fri Mar 25 2022 Karolina Surma - 1.0.0-3 - Unbundle fonts properly, improve referencing them in css files