Fix test failure caused by python-sphinx update to 7.0.1
This commit is contained in:
parent
5404e72695
commit
13227c9a09
37
Dont-test-for-jquery.js-presence-with-Sphinx-6.patch
Normal file
37
Dont-test-for-jquery.js-presence-with-Sphinx-6.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
From 491ea985bb06eb7dc9e43bdd99006b36ba104b72 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karolina Surma <ksurma@redhat.com>
|
||||||
|
Date: Fri, 14 Apr 2023 13:47:28 +0200
|
||||||
|
Subject: [PATCH] Don't test for jquery.js presence with Sphinx 6+
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/test_urls.py | 11 +++++++++--
|
||||||
|
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_urls.py b/tests/test_urls.py
|
||||||
|
index 6475715..faafbea 100644
|
||||||
|
--- a/tests/test_urls.py
|
||||||
|
+++ b/tests/test_urls.py
|
||||||
|
@@ -528,11 +528,18 @@ def test_sphinx_resource_urls(app, status, warning):
|
||||||
|
|
||||||
|
chunks = [
|
||||||
|
# Sphinx's resources URLs
|
||||||
|
- _get_js_html_link_tag('en', 'latest', 'jquery.js'),
|
||||||
|
- _get_js_html_link_tag('en', 'latest', 'underscore.js'),
|
||||||
|
_get_js_html_link_tag('en', 'latest', 'doctools.js'),
|
||||||
|
]
|
||||||
|
|
||||||
|
+ # Sphinx 6+ no longer includes jquery.js and underscore.js
|
||||||
|
+ if sphinx.version_info < (6, 0, 0):
|
||||||
|
+ chunks.extend(
|
||||||
|
+ [
|
||||||
|
+ _get_js_html_link_tag('en', 'latest', 'jquery.js'),
|
||||||
|
+ _get_js_html_link_tag('en', 'latest', 'underscore.js'),
|
||||||
|
+ ]
|
||||||
|
+ )
|
||||||
|
+
|
||||||
|
# This file was added to all the HTML pages in Sphinx>=1.8. However, it was
|
||||||
|
# only required for search page. Sphinx>=3.4 fixes this and only adds it on
|
||||||
|
# search. See (https://github.com/sphinx-doc/sphinx/blob/v3.4.0/CHANGES#L87)
|
||||||
|
--
|
||||||
|
2.39.2
|
||||||
|
|
||||||
61
Fix-testcase-rel-content-mismatch-error.patch
Normal file
61
Fix-testcase-rel-content-mismatch-error.patch
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
From 6e76ef19e1771aed34a2f6a25e558ed485153cf1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: starlet-dx <15929766099@163.com>
|
||||||
|
Date: Sat, 29 Jul 2023 11:28:15 +0800
|
||||||
|
Subject: [PATCH 1/1] fix testcase rel content mismatch error
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/test_urls.py | 10 +++++-----
|
||||||
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_urls.py b/tests/test_urls.py
|
||||||
|
index 59163e0..f836122 100644
|
||||||
|
--- a/tests/test_urls.py
|
||||||
|
+++ b/tests/test_urls.py
|
||||||
|
@@ -63,7 +63,7 @@ def test_default_settings(app, status, warning):
|
||||||
|
'<title>Page not found — Python documentation</title>',
|
||||||
|
|
||||||
|
# favicon and logo
|
||||||
|
- '<link rel="shortcut icon" href="/en/latest/_static/favicon.png"/>',
|
||||||
|
+ '<link rel="icon" href="/en/latest/_static/favicon.png"/>',
|
||||||
|
'<img class="logo" src="/en/latest/_static/logo.svg" alt="Logo"/>',
|
||||||
|
|
||||||
|
# sidebar URLs
|
||||||
|
@@ -135,7 +135,7 @@ def test_default_language_setting(app, status, warning):
|
||||||
|
'<li><a href="/ja/latest/index.html">Documentation overview</a><ul>',
|
||||||
|
|
||||||
|
# favicon and logo
|
||||||
|
- '<link rel="shortcut icon" href="/ja/latest/_static/favicon.png"/>',
|
||||||
|
+ '<link rel="icon" href="/ja/latest/_static/favicon.png"/>',
|
||||||
|
'<img class="logo" src="/ja/latest/_static/logo.svg" alt="Logo"/>',
|
||||||
|
|
||||||
|
# resources
|
||||||
|
@@ -168,7 +168,7 @@ def test_default_version_setting(app, status, warning):
|
||||||
|
'<li><a href="/en/customversion/index.html">Documentation overview</a><ul>',
|
||||||
|
|
||||||
|
# favicon and logo
|
||||||
|
- '<link rel="shortcut icon" href="/en/customversion/_static/favicon.png"/>',
|
||||||
|
+ '<link rel="icon" href="/en/customversion/_static/favicon.png"/>',
|
||||||
|
'<img class="logo" src="/en/customversion/_static/logo.svg" alt="Logo"/>',
|
||||||
|
|
||||||
|
# resources
|
||||||
|
@@ -230,7 +230,7 @@ def test_urls_prefix_setting(app, status, warning):
|
||||||
|
'<li><a href="/language/version/index.html">Documentation overview</a><ul>',
|
||||||
|
|
||||||
|
# favicon and logo
|
||||||
|
- '<link rel="shortcut icon" href="/language/version/_static/favicon.png"/>',
|
||||||
|
+ '<link rel="icon" href="/language/version/_static/favicon.png"/>',
|
||||||
|
'<img class="logo" src="/language/version/_static/logo.svg" alt="Logo"/>',
|
||||||
|
|
||||||
|
# resources
|
||||||
|
@@ -263,7 +263,7 @@ def test_urls_prefix_setting_none(app, status, warning):
|
||||||
|
'<li><a href="/index.html">Documentation overview</a><ul>',
|
||||||
|
|
||||||
|
# favicon and logo
|
||||||
|
- '<link rel="shortcut icon" href="/_static/favicon.png"/>',
|
||||||
|
+ '<link rel="icon" href="/_static/favicon.png"/>',
|
||||||
|
'<img class="logo" src="/_static/logo.svg" alt="Logo"/>',
|
||||||
|
|
||||||
|
# resources
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
||||||
@ -7,13 +7,16 @@
|
|||||||
|
|
||||||
Name: python-%{pypi_name}
|
Name: python-%{pypi_name}
|
||||||
Version: 0.8.3
|
Version: 0.8.3
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: Create a custom 404 page with absolute URLs hardcoded
|
Summary: Create a custom 404 page with absolute URLs hardcoded
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://pypi.python.org/pypi/%{pypi_name}
|
URL: https://pypi.python.org/pypi/%{pypi_name}
|
||||||
Source0: https://github.com/%{project_owner}/%{github_name}/archive/%{version}.tar.gz
|
Source0: https://github.com/%{project_owner}/%{github_name}/archive/%{version}.tar.gz
|
||||||
|
|
||||||
|
Patch0: Fix-testcase-rel-content-mismatch-error.patch
|
||||||
|
Patch1: Dont-test-for-jquery.js-presence-with-Sphinx-6.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -55,6 +58,9 @@ PYTHONPATH=$PWD py.test-%{python3_version} -v .
|
|||||||
%{python3_sitelib}/%{importname}/
|
%{python3_sitelib}/%{importname}/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jul 29 2023 yaoxin <yao_xin001@hoperun.com> - 0.8.3-3
|
||||||
|
- Fix test failure caused by python-sphinx update to 7.0.1
|
||||||
|
|
||||||
* Wed Apr 26 2023 liyanan <thistleslyn@163.com> - 0.8.3-2
|
* Wed Apr 26 2023 liyanan <thistleslyn@163.com> - 0.8.3-2
|
||||||
- Adapting to the pyproject.toml compilation mode
|
- Adapting to the pyproject.toml compilation mode
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user