Version 1.0.0.
- Drop upstreamed patch for Sphinx 4.1+. - Use the pyproject macros.
This commit is contained in:
parent
a57fd0b745
commit
0c1e3f38ee
@ -1,40 +0,0 @@
|
|||||||
From 2ab605a455960523bf56bb305e254db3ebc5d00c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Aaron Carlisle <carlisle.b3d@gmail.com>
|
|
||||||
Date: Tue, 13 Jul 2021 05:16:47 -0400
|
|
||||||
Subject: [PATCH] Tests: Fix deprecation warning with new sphinx versions
|
|
||||||
(#1105)
|
|
||||||
|
|
||||||
* Tests: Fix deprecation warning with new sphinx versions
|
|
||||||
|
|
||||||
These builders where split in sphinx and the old import path will be removed in the upcoming Sphinx 4 release.
|
|
||||||
|
|
||||||
This patch requires sphinx 2 so this will be committed into the v2 release.
|
|
||||||
|
|
||||||
* Fix imports
|
|
||||||
|
|
||||||
* Use try/except for backwards compatibility
|
|
||||||
---
|
|
||||||
tests/test_builders.py | 10 +++++++++-
|
|
||||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/tests/test_builders.py b/tests/test_builders.py
|
|
||||||
index ce8fb3cc1..d3d3c51b7 100644
|
|
||||||
--- a/tests/test_builders.py
|
|
||||||
+++ b/tests/test_builders.py
|
|
||||||
@@ -3,7 +3,15 @@
|
|
||||||
import pytest
|
|
||||||
import sphinx
|
|
||||||
from sphinx import addnodes
|
|
||||||
-from sphinx.builders.html import SingleFileHTMLBuilder, DirectoryHTMLBuilder
|
|
||||||
+try:
|
|
||||||
+ # Available from Sphinx 2.0
|
|
||||||
+ from sphinx.builders.dirhtml import DirectoryHTMLBuilder
|
|
||||||
+ from sphinx.builders.singlehtml import SingleFileHTMLBuilder
|
|
||||||
+except ImportError:
|
|
||||||
+ from sphinx.builders.html import (
|
|
||||||
+ DirectoryHTMLBuilder,
|
|
||||||
+ SingleFileHTMLBuilder,
|
|
||||||
+ )
|
|
||||||
|
|
||||||
from .util import build_all
|
|
||||||
|
|
@ -1,17 +1,17 @@
|
|||||||
--- a/package.json
|
--- a/package.json
|
||||||
+++ b/package.json
|
+++ b/package.json
|
||||||
@@ -16,7 +16,6 @@
|
@@ -25,7 +25,6 @@
|
||||||
"css-loader": "^3.1.0",
|
"css-loader": "^3.6.0",
|
||||||
"file-loader": "^3.0.1",
|
"file-loader": "^3.0.1",
|
||||||
"font-awesome": "^4.7.0",
|
"font-awesome": "^4.7.0",
|
||||||
- "html5shiv": "^3.7.3",
|
- "html5shiv": "^3.7.3",
|
||||||
"imports-loader": "^0.8.0",
|
"imports-loader": "^0.8.0",
|
||||||
"jquery": "^3.4.1",
|
"jquery": "^3.6.0",
|
||||||
"lato-font": "^3.0.0",
|
"lato-font": "^3.0.0",
|
||||||
--- a/package-lock.json
|
--- a/package-lock.json
|
||||||
+++ b/package-lock.json
|
+++ b/package-lock.json
|
||||||
@@ -3614,12 +3614,6 @@
|
@@ -3246,12 +3246,6 @@
|
||||||
"integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=",
|
"integrity": "sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
- "html5shiv": {
|
- "html5shiv": {
|
||||||
@ -25,16 +25,16 @@
|
|||||||
"resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz",
|
"resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz",
|
||||||
--- a/sphinx_rtd_theme/layout.html
|
--- a/sphinx_rtd_theme/layout.html
|
||||||
+++ b/sphinx_rtd_theme/layout.html
|
+++ b/sphinx_rtd_theme/layout.html
|
||||||
@@ -45,9 +45,6 @@
|
@@ -61,9 +61,6 @@
|
||||||
|
|
||||||
{# JAVASCRIPTS #}
|
{#- JAVASCRIPTS #}
|
||||||
{%- block scripts %}
|
{%- block scripts %}
|
||||||
- <!--[if lt IE 9]>
|
- <!--[if lt IE 9]>
|
||||||
- <script src="{{ pathto('_static/js/html5shiv.min.js', 1) }}"></script>
|
- <script src="{{ pathto('_static/js/html5shiv.min.js', 1) }}"></script>
|
||||||
- <![endif]-->
|
- <![endif]-->
|
||||||
{%- if not embedded %}
|
{%- if not embedded %}
|
||||||
{# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #}
|
{# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #}
|
||||||
{% if sphinx_version >= "1.8.0" %}
|
{%- if sphinx_version_info >= (1, 8) -%}
|
||||||
--- a/webpack.common.js
|
--- a/webpack.common.js
|
||||||
+++ b/webpack.common.js
|
+++ b/webpack.common.js
|
||||||
@@ -1,6 +1,5 @@
|
@@ -1,6 +1,5 @@
|
||||||
|
File diff suppressed because one or more lines are too long
@ -4,8 +4,8 @@
|
|||||||
%bcond_with bootstrap
|
%bcond_with bootstrap
|
||||||
|
|
||||||
Name: python-%{srcname}
|
Name: python-%{srcname}
|
||||||
Version: 0.5.2
|
Version: 1.0.0
|
||||||
Release: 5%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Sphinx theme for readthedocs.org
|
Summary: Sphinx theme for readthedocs.org
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
@ -20,9 +20,6 @@ Patch0: %{name}-html5shiv.patch
|
|||||||
# Unbundle fonts. Refer to local fonts instead.
|
# Unbundle fonts. Refer to local fonts instead.
|
||||||
Patch1: %{name}-unbundle-fonts.patch
|
Patch1: %{name}-unbundle-fonts.patch
|
||||||
|
|
||||||
# Fix for Sphinx 4.1+, backported from upstream
|
|
||||||
Patch2: https://github.com/readthedocs/sphinx_rtd_theme/commit/2ab605a455.patch
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: font(fontawesome)
|
BuildRequires: font(fontawesome)
|
||||||
@ -31,7 +28,9 @@ BuildRequires: font(robotoslab)
|
|||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
BuildRequires: %{py3_dist docutils}
|
BuildRequires: %{py3_dist docutils}
|
||||||
|
BuildRequires: %{py3_dist pip}
|
||||||
BuildRequires: %{py3_dist setuptools}
|
BuildRequires: %{py3_dist setuptools}
|
||||||
|
BuildRequires: %{py3_dist wheel}
|
||||||
%if %{without bootstrap}
|
%if %{without bootstrap}
|
||||||
BuildRequires: %{py3_dist pytest}
|
BuildRequires: %{py3_dist pytest}
|
||||||
BuildRequires: %{py3_dist readthedocs-sphinx-ext}
|
BuildRequires: %{py3_dist readthedocs-sphinx-ext}
|
||||||
@ -74,8 +73,8 @@ readthedocs.org.
|
|||||||
%autosetup -p1 -n %{srcname}-%{version}
|
%autosetup -p1 -n %{srcname}-%{version}
|
||||||
|
|
||||||
# Use local objects.inv for intersphinx
|
# Use local objects.inv for intersphinx
|
||||||
sed -e "s|\('https://docs\.readthedocs\.io/en/latest/', \)None|\1'%{SOURCE1}'|" \
|
sed -e "s|\('https://docs\.readthedocs\.io/en/stable/', \)None|\1'%{SOURCE1}'|" \
|
||||||
-e "s|\('http://www\.sphinx-doc\.org/en/stable/', \)None|\1'%{_docdir}/python-sphinx-doc/html/objects.inv'|" \
|
-e "s|\('https://www\.sphinx-doc\.org/en/master/', \)None|\1'%{_docdir}/python-sphinx-doc/html/objects.inv'|" \
|
||||||
-i docs/conf.py
|
-i docs/conf.py
|
||||||
|
|
||||||
# We cannot build the Javascript from source at this time, due to many missing
|
# We cannot build the Javascript from source at this time, due to many missing
|
||||||
@ -87,7 +86,7 @@ cp -p sphinx_rtd_theme/static/js/theme.js build/lib/%{srcname}/static/js
|
|||||||
sed -i "/'build_py'/d" setup.py
|
sed -i "/'build_py'/d" setup.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%if %{without bootstrap}
|
%if %{without bootstrap}
|
||||||
# Build the documentation
|
# Build the documentation
|
||||||
@ -97,7 +96,7 @@ make -C docs html
|
|||||||
rst2html --no-datestamp README.rst README.html
|
rst2html --no-datestamp README.rst README.html
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py3_install
|
%pyproject_install
|
||||||
|
|
||||||
%if %{without bootstrap}
|
%if %{without bootstrap}
|
||||||
rm docs/build/html/.buildinfo
|
rm docs/build/html/.buildinfo
|
||||||
@ -114,7 +113,7 @@ rm -fr %{buildroot}%{python3_sitelib}/%{srcname}/static/css/fonts
|
|||||||
%files -n python%{python3_pkgversion}-%{srcname}
|
%files -n python%{python3_pkgversion}-%{srcname}
|
||||||
%doc README.html
|
%doc README.html
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{python3_sitelib}/%{srcname}-*.egg-info/
|
%{python3_sitelib}/%{srcname}-%{version}.dist-info/
|
||||||
%dir %{python3_sitelib}/%{srcname}/
|
%dir %{python3_sitelib}/%{srcname}/
|
||||||
%{python3_sitelib}/%{srcname}/__pycache__/
|
%{python3_sitelib}/%{srcname}/__pycache__/
|
||||||
%{python3_sitelib}/%{srcname}/static/
|
%{python3_sitelib}/%{srcname}/static/
|
||||||
@ -127,13 +126,18 @@ rm -fr %{buildroot}%{python3_sitelib}/%{srcname}/static/css/fonts
|
|||||||
%lang(en) %{python3_sitelib}/%{srcname}/locale/en/
|
%lang(en) %{python3_sitelib}/%{srcname}/locale/en/
|
||||||
%lang(es) %{python3_sitelib}/%{srcname}/locale/es/
|
%lang(es) %{python3_sitelib}/%{srcname}/locale/es/
|
||||||
%lang(et) %{python3_sitelib}/%{srcname}/locale/et/
|
%lang(et) %{python3_sitelib}/%{srcname}/locale/et/
|
||||||
|
%lang(fa_IR) %{python3_sitelib}/%{srcname}/locale/fa_IR/
|
||||||
%lang(fr) %{python3_sitelib}/%{srcname}/locale/fr/
|
%lang(fr) %{python3_sitelib}/%{srcname}/locale/fr/
|
||||||
|
%lang(it) %{python3_sitelib}/%{srcname}/locale/it/
|
||||||
|
%lang(lt) %{python3_sitelib}/%{srcname}/locale/lt/
|
||||||
%lang(nl) %{python3_sitelib}/%{srcname}/locale/nl/
|
%lang(nl) %{python3_sitelib}/%{srcname}/locale/nl/
|
||||||
%lang(pt) %{python3_sitelib}/%{srcname}/locale/pt_BR/
|
%lang(pl) %{python3_sitelib}/%{srcname}/locale/pl/
|
||||||
|
%lang(pt) %{python3_sitelib}/%{srcname}/locale/pt/
|
||||||
|
%lang(pt_BR) %{python3_sitelib}/%{srcname}/locale/pt_BR/
|
||||||
%lang(ru) %{python3_sitelib}/%{srcname}/locale/ru/
|
%lang(ru) %{python3_sitelib}/%{srcname}/locale/ru/
|
||||||
%lang(sv) %{python3_sitelib}/%{srcname}/locale/sv/
|
%lang(sv) %{python3_sitelib}/%{srcname}/locale/sv/
|
||||||
%lang(tr) %{python3_sitelib}/%{srcname}/locale/tr/
|
%lang(tr) %{python3_sitelib}/%{srcname}/locale/tr/
|
||||||
%lang(zh) %{python3_sitelib}/%{srcname}/locale/zh_CN/
|
%lang(zh_CN) %{python3_sitelib}/%{srcname}/locale/zh_CN/
|
||||||
|
|
||||||
%if %{without bootstrap}
|
%if %{without bootstrap}
|
||||||
%files doc
|
%files doc
|
||||||
@ -142,6 +146,11 @@ rm -fr %{buildroot}%{python3_sitelib}/%{srcname}/static/css/fonts
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 14 2021 Jerry James <loganjerry@gmail.com> - 1.0.0-1
|
||||||
|
- Version 1.0.0
|
||||||
|
- Drop upstreamed patch for Sphinx 4.1+
|
||||||
|
- Use the pyproject macros
|
||||||
|
|
||||||
* Wed Aug 04 2021 Miro Hrončok <mhroncok@redhat.com> - 0.5.2-5
|
* Wed Aug 04 2021 Miro Hrončok <mhroncok@redhat.com> - 0.5.2-5
|
||||||
- Fix for Sphinx 4.1+
|
- Fix for Sphinx 4.1+
|
||||||
|
|
||||||
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
|||||||
SHA512 (sphinx_rtd_theme-0.5.2.tar.gz) = 445acd7a5bb4c67db2fcd89c5caaaf6ae2c650d4d79c9da8499e1d8ac0a850b02e3e758c08aa8fd8f23f9bb4ed058c1b22ec3325c47d2eb38404483a18868a7a
|
SHA512 (sphinx_rtd_theme-1.0.0.tar.gz) = ff69f6364ed8e979140c76150bae94e5ed5227b652dd1a0764e3ae8ba73b01fe3c7f702ce2c5f560d67544c6410735d12631419163fc882ae55e1254437222e2
|
||||||
SHA512 (objects.inv) = 93f4df7ef77ef9fd24305bc3624ae4b76d45eccb2ca21fc4e7b54795adc2d50d17a165344aef65d11b316592f663e6ea7f62dbeaaf17d6d7b00bd7a4be6341f7
|
SHA512 (objects.inv) = a4109c3c70e2329ae38cf2a276b3cab0f406e70b6fbe210b1617ade85c03fa5ad37e89d58ae928a355ba0f2bafe22c17e361819600c8d8e5235672ef355bf966
|
||||||
|
Loading…
Reference in New Issue
Block a user