Avoid build dependency on readthedocs-sphinx-ext

This commit is contained in:
Miro Hrončok 2022-04-13 12:31:05 +02:00
parent 19b8629796
commit b6a6bd488b

View File

@ -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 <mhroncok@redhat.com> - 1.0.0-4
- Avoid build dependency on readthedocs-sphinx-ext
* Fri Mar 25 2022 Karolina Surma <ksurma@redhat.com> - 1.0.0-3
- Unbundle fonts properly, improve referencing them in css files