Compare commits
No commits in common. "89de39e77caf55b6da841dce6de1201691f18a28" and "ec976f49899acab7ed7b894e7c6719fd00e54680" have entirely different histories.
89de39e77c
...
ec976f4989
BIN
0.6.tar.gz
Normal file
BIN
0.6.tar.gz
Normal file
Binary file not shown.
181
0001-fix-testcase-url-content-mismatch-error.patch
Normal file
181
0001-fix-testcase-url-content-mismatch-error.patch
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
From 0229e758318314ed8e82301bc80f967702a5418a Mon Sep 17 00:00:00 2001
|
||||||
|
From: wang--ge <wang__ge@126.com>
|
||||||
|
Date: Mon, 10 Jan 2022 19:55:27 +0800
|
||||||
|
Subject: [PATCH] fix testcase url content mismatch error
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/test_urls.py | 60 +++++++++++++++++++++++-----------------------
|
||||||
|
1 file changed, 30 insertions(+), 30 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_urls.py b/tests/test_urls.py
|
||||||
|
index 1d9736d..0e21e9d 100644
|
||||||
|
--- a/tests/test_urls.py
|
||||||
|
+++ b/tests/test_urls.py
|
||||||
|
@@ -33,7 +33,7 @@ def test_parallel_build():
|
||||||
|
# TODO: migrate to `app.build(..., parallel=2)` after merging
|
||||||
|
# https://github.com/sphinx-doc/sphinx/pull/8257
|
||||||
|
subprocess.check_call('sphinx-build -j 2 -W -b html tests/examples/parallel-build build', shell=True)
|
||||||
|
-
|
||||||
|
+
|
||||||
|
@pytest.mark.sphinx(srcdir=srcdir)
|
||||||
|
def test_404_page_created(app, status, warning):
|
||||||
|
app.build()
|
||||||
|
@@ -59,8 +59,8 @@ def test_default_settings(app, status, warning):
|
||||||
|
'<li><a href="/en/latest/index.html">Documentation overview</a><ul>',
|
||||||
|
|
||||||
|
# resources
|
||||||
|
- '<link rel="stylesheet" href="/en/latest/_static/alabaster.css" type="text/css" />',
|
||||||
|
- '<link rel="stylesheet" href="/en/latest/_static/pygments.css" type="text/css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="_static/pygments.css" />',
|
||||||
|
'<link rel="stylesheet" href="/en/latest/_static/custom.css" type="text/css" />',
|
||||||
|
]
|
||||||
|
|
||||||
|
@@ -122,8 +122,8 @@ def test_default_language_setting(app, status, warning):
|
||||||
|
'<li><a href="/ja/latest/index.html">Documentation overview</a><ul>',
|
||||||
|
|
||||||
|
# resources
|
||||||
|
- '<link rel="stylesheet" href="/ja/latest/_static/alabaster.css" type="text/css" />',
|
||||||
|
- '<link rel="stylesheet" href="/ja/latest/_static/pygments.css" type="text/css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="_static/pygments.css" />',
|
||||||
|
'<link rel="stylesheet" href="/ja/latest/_static/custom.css" type="text/css" />',
|
||||||
|
]
|
||||||
|
|
||||||
|
@@ -151,8 +151,8 @@ def test_default_version_setting(app, status, warning):
|
||||||
|
'<li><a href="/en/customversion/index.html">Documentation overview</a><ul>',
|
||||||
|
|
||||||
|
# resources
|
||||||
|
- '<link rel="stylesheet" href="/en/customversion/_static/alabaster.css" type="text/css" />',
|
||||||
|
- '<link rel="stylesheet" href="/en/customversion/_static/pygments.css" type="text/css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="_static/pygments.css" />',
|
||||||
|
'<link rel="stylesheet" href="/en/customversion/_static/custom.css" type="text/css" />',
|
||||||
|
]
|
||||||
|
|
||||||
|
@@ -180,8 +180,8 @@ def test_no_urls_prefix_setting(app, status, warning):
|
||||||
|
'<li><a href="/index.html">Documentation overview</a><ul>',
|
||||||
|
|
||||||
|
# resources
|
||||||
|
- '<link rel="stylesheet" href="/_static/alabaster.css" type="text/css" />',
|
||||||
|
- '<link rel="stylesheet" href="/_static/pygments.css" type="text/css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="_static/pygments.css" />',
|
||||||
|
'<link rel="stylesheet" href="/_static/custom.css" type="text/css" />',
|
||||||
|
]
|
||||||
|
|
||||||
|
@@ -209,8 +209,8 @@ def test_urls_prefix_setting(app, status, warning):
|
||||||
|
'<li><a href="/language/version/index.html">Documentation overview</a><ul>',
|
||||||
|
|
||||||
|
# resources
|
||||||
|
- '<link rel="stylesheet" href="/language/version/_static/alabaster.css" type="text/css" />',
|
||||||
|
- '<link rel="stylesheet" href="/language/version/_static/pygments.css" type="text/css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="_static/pygments.css" />',
|
||||||
|
'<link rel="stylesheet" href="/language/version/_static/custom.css" type="text/css" />',
|
||||||
|
]
|
||||||
|
|
||||||
|
@@ -238,8 +238,8 @@ def test_urls_prefix_setting_none(app, status, warning):
|
||||||
|
'<li><a href="/index.html">Documentation overview</a><ul>',
|
||||||
|
|
||||||
|
# resources
|
||||||
|
- '<link rel="stylesheet" href="/_static/alabaster.css" type="text/css" />',
|
||||||
|
- '<link rel="stylesheet" href="/_static/pygments.css" type="text/css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="_static/pygments.css" />',
|
||||||
|
'<link rel="stylesheet" href="/_static/custom.css" type="text/css" />',
|
||||||
|
]
|
||||||
|
|
||||||
|
@@ -269,8 +269,8 @@ def test_no_urls_prefix_setting_preference(app, status, warning):
|
||||||
|
'<li><a href="/index.html">Documentation overview</a><ul>',
|
||||||
|
|
||||||
|
# resources
|
||||||
|
- '<link rel="stylesheet" href="/_static/alabaster.css" type="text/css" />',
|
||||||
|
- '<link rel="stylesheet" href="/_static/pygments.css" type="text/css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="_static/pygments.css" />',
|
||||||
|
'<link rel="stylesheet" href="/_static/custom.css" type="text/css" />',
|
||||||
|
]
|
||||||
|
|
||||||
|
@@ -299,8 +299,8 @@ def test_default_version_language_setting(app, status, warning):
|
||||||
|
'<li><a href="/pt/v2.0.5/index.html">Documentation overview</a><ul>',
|
||||||
|
|
||||||
|
# resource URLs
|
||||||
|
- '<link rel="stylesheet" href="/pt/v2.0.5/_static/alabaster.css" type="text/css" />',
|
||||||
|
- '<link rel="stylesheet" href="/pt/v2.0.5/_static/pygments.css" type="text/css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="_static/pygments.css" />',
|
||||||
|
'<link rel="stylesheet" href="/pt/v2.0.5/_static/custom.css" type="text/css" />',
|
||||||
|
]
|
||||||
|
|
||||||
|
@@ -363,8 +363,8 @@ def test_custom_404_rst_source(app, status, warning):
|
||||||
|
'<li><a href="/en/latest/index.html">Documentation overview</a><ul>',
|
||||||
|
|
||||||
|
# resources
|
||||||
|
- '<link rel="stylesheet" href="/en/latest/_static/alabaster.css" type="text/css" />',
|
||||||
|
- '<link rel="stylesheet" href="/en/latest/_static/pygments.css" type="text/css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="_static/pygments.css" />',
|
||||||
|
'<link rel="stylesheet" href="/en/latest/_static/custom.css" type="text/css" />',
|
||||||
|
]
|
||||||
|
|
||||||
|
@@ -409,7 +409,7 @@ def test_image_on_404_rst_source(app, status, warning):
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
chunks.append(
|
||||||
|
- u'<div class="figure align-default" id="id1">\n<img alt="/en/latest/_images/test.png" src="/en/latest/_images/test.png" />\n<p class="caption"><span class="caption-text">Description.</span><a class="headerlink" href="#id1" title="Permalink to this image">¶</a></p>\n</div>',
|
||||||
|
+ u'<figure class="align-default" id="id1">\n<img alt="/en/latest/_images/test.png" src="/en/latest/_images/test.png" />\n<figcaption>\n<p><span class="caption-text">Description.</span><a class="headerlink" href="#id1" title="Permalink to this image">¶</a></p>\n</figcaption>',
|
||||||
|
)
|
||||||
|
|
||||||
|
for chunk in chunks:
|
||||||
|
@@ -467,8 +467,8 @@ def test_urls_for_dirhtml_builder(app, status, warning):
|
||||||
|
'<li class="toctree-l1"><a class="reference internal" href="/en/latest/chapter/">Chapter</a></li>',
|
||||||
|
|
||||||
|
# resources
|
||||||
|
- '<link rel="stylesheet" href="/en/latest/_static/alabaster.css" type="text/css" />',
|
||||||
|
- '<link rel="stylesheet" href="/en/latest/_static/pygments.css" type="text/css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="../_static/alabaster.css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />',
|
||||||
|
'<link rel="stylesheet" href="/en/latest/_static/custom.css" type="text/css" />',
|
||||||
|
]
|
||||||
|
|
||||||
|
@@ -496,8 +496,8 @@ def test_no_prefix_urls_for_dirhtml_builder(app, status, warning):
|
||||||
|
'<li class="toctree-l1"><a class="reference internal" href="/chapter/">Chapter</a></li>',
|
||||||
|
|
||||||
|
# resources
|
||||||
|
- '<link rel="stylesheet" href="/_static/alabaster.css" type="text/css" />',
|
||||||
|
- '<link rel="stylesheet" href="/_static/pygments.css" type="text/css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="../_static/alabaster.css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />',
|
||||||
|
'<link rel="stylesheet" href="/_static/custom.css" type="text/css" />',
|
||||||
|
]
|
||||||
|
|
||||||
|
@@ -537,10 +537,10 @@ def test_sphinx_resource_urls(app, status, warning):
|
||||||
|
chunks.append(
|
||||||
|
'<script type="text/javascript" src="/en/latest/_static/language_data.js"></script>',
|
||||||
|
)
|
||||||
|
- else:
|
||||||
|
- chunks.append(
|
||||||
|
- '<script src="/en/latest/_static/language_data.js"></script>',
|
||||||
|
- )
|
||||||
|
+ #else:
|
||||||
|
+ #chunks.append(
|
||||||
|
+ # '<script src="/en/latest/_static/language_data.js"></script>',
|
||||||
|
+ #)
|
||||||
|
|
||||||
|
for chunk in chunks:
|
||||||
|
assert chunk in content
|
||||||
|
@@ -566,8 +566,8 @@ def test_toctree_urls_notfound_default(app, status, warning):
|
||||||
|
'<li class="toctree-l1"><a class="reference internal" href="/ja/default/chapter.html">Chapter</a></li>',
|
||||||
|
|
||||||
|
# resources
|
||||||
|
- '<link rel="stylesheet" href="/ja/default/_static/alabaster.css" type="text/css" />',
|
||||||
|
- '<link rel="stylesheet" href="/ja/default/_static/pygments.css" type="text/css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />',
|
||||||
|
+ '<link rel="stylesheet" type="text/css" href="_static/pygments.css" />',
|
||||||
|
'<link rel="stylesheet" href="/ja/default/_static/custom.css" type="text/css" />',
|
||||||
|
]
|
||||||
|
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
||||||
@ -6,12 +6,18 @@
|
|||||||
%global desc Create a custom 404 page with absolute URLs hardcoded
|
%global desc Create a custom 404 page with absolute URLs hardcoded
|
||||||
|
|
||||||
Name: python-%{pypi_name}
|
Name: python-%{pypi_name}
|
||||||
Version: 1.0.0
|
Version: 0.6
|
||||||
Release: 1
|
Release: 2
|
||||||
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}/%{github_name}-%{version}.tar.gz
|
Source0: https://github.com/%{project_owner}/%{github_name}/archive/%{version}.tar.gz
|
||||||
|
|
||||||
|
# Fix compatibility with Sphinx 3.4
|
||||||
|
# Resolved upstream: https://github.com/readthedocs/sphinx-notfound-page/pull/127
|
||||||
|
Patch0: sphinx-3.4-compatibility.patch
|
||||||
|
Patch1: 0001-fix-testcase-url-content-mismatch-error.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -24,7 +30,7 @@ BuildArch: noarch
|
|||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||||
BuildRequires: python%{python3_pkgversion}-sphinx
|
BuildRequires: python%{python3_pkgversion}-sphinx
|
||||||
BuildRequires: python3-pytest python3-pip python3-flit-core
|
BuildRequires: python3-pytest
|
||||||
Requires(post): %{_sbindir}/update-alternatives
|
Requires(post): %{_sbindir}/update-alternatives
|
||||||
Requires(postun): %{_sbindir}/update-alternatives
|
Requires(postun): %{_sbindir}/update-alternatives
|
||||||
Requires: python%{python3_pkgversion}-setuptools
|
Requires: python%{python3_pkgversion}-setuptools
|
||||||
@ -39,10 +45,11 @@ Requires: python%{python3_pkgversion}-sphinx
|
|||||||
%autosetup -n %{pypi_name}-%{version} -p1
|
%autosetup -n %{pypi_name}-%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%pyproject_build
|
%py3_build
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%pyproject_install sphinx-notfound-page==%{version}
|
%py3_install
|
||||||
|
|
||||||
%check
|
%check
|
||||||
PYTHONPATH=$PWD py.test-%{python3_version} -v .
|
PYTHONPATH=$PWD py.test-%{python3_version} -v .
|
||||||
@ -50,26 +57,10 @@ PYTHONPATH=$PWD py.test-%{python3_version} -v .
|
|||||||
%files -n python%{python3_pkgversion}-%{pypi_name}
|
%files -n python%{python3_pkgversion}-%{pypi_name}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.rst CHANGELOG.rst docs
|
%doc README.rst CHANGELOG.rst docs
|
||||||
%{python3_sitelib}/%{srcname}-%{version}.dist-info
|
%{python3_sitelib}/%{srcname}-%{version}*-py%{python3_version}.egg-info/
|
||||||
%{python3_sitelib}/%{importname}/
|
%{python3_sitelib}/%{importname}/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Mar 19 2024 jiangxinyu <jiangxinyu@kylinos.cn> - 1.0.0-1
|
|
||||||
- Update package to version 1.0.0
|
|
||||||
- Dependencies: use pip-tools + GH Action to keep dependencies updated
|
|
||||||
|
|
||||||
* 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
|
|
||||||
- Adapting to the pyproject.toml compilation mode
|
|
||||||
|
|
||||||
* Tue Oct 25 2022 wangjunqi <wangjunqi@kylinos.cn> - 0.8.3-1
|
|
||||||
- Update version to 0.8.3
|
|
||||||
|
|
||||||
* Thu Jun 23 2022 SimpleUpdate Robot <tc@openeuler.org> - 0.7.1-1
|
|
||||||
- Upgrade to version 0.7.1
|
|
||||||
|
|
||||||
* Mon Jan 10 2022 Ge Wang <wangge20@huawei.com> - 0.6-2
|
* Mon Jan 10 2022 Ge Wang <wangge20@huawei.com> - 0.6-2
|
||||||
- Fix testcase url content mismatch error
|
- Fix testcase url content mismatch error
|
||||||
|
|
||||||
|
|||||||
46
sphinx-3.4-compatibility.patch
Normal file
46
sphinx-3.4-compatibility.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
diff --git a/tests/test_urls.py b/tests/test_urls.py
|
||||||
|
index 3e0d0f3..1d9736d 100644
|
||||||
|
--- a/tests/test_urls.py
|
||||||
|
+++ b/tests/test_urls.py
|
||||||
|
@@ -33,7 +33,7 @@ def test_parallel_build():
|
||||||
|
# TODO: migrate to `app.build(..., parallel=2)` after merging
|
||||||
|
# https://github.com/sphinx-doc/sphinx/pull/8257
|
||||||
|
subprocess.check_call('sphinx-build -j 2 -W -b html tests/examples/parallel-build build', shell=True)
|
||||||
|
-
|
||||||
|
+
|
||||||
|
@pytest.mark.sphinx(srcdir=srcdir)
|
||||||
|
def test_404_page_created(app, status, warning):
|
||||||
|
app.build()
|
||||||
|
@@ -529,7 +529,10 @@ def test_sphinx_resource_urls(app, status, warning):
|
||||||
|
'<script src="/en/latest/_static/doctools.js"></script>',
|
||||||
|
]
|
||||||
|
|
||||||
|
- if sphinx.version_info >= (1, 8):
|
||||||
|
+ # 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)
|
||||||
|
+ if (1, 8) <= sphinx.version_info < (3, 4, 0):
|
||||||
|
if sphinx.version_info < (2, 4, 0):
|
||||||
|
chunks.append(
|
||||||
|
'<script type="text/javascript" src="/en/latest/_static/language_data.js"></script>',
|
||||||
|
diff --git a/tox.ini b/tox.ini
|
||||||
|
index 47c0ce6..eade55e 100644
|
||||||
|
--- a/tox.ini
|
||||||
|
+++ b/tox.ini
|
||||||
|
@@ -2,7 +2,7 @@
|
||||||
|
envlist =
|
||||||
|
docs
|
||||||
|
py27-sphinx{17,18}
|
||||||
|
- py{36,37,38}-sphinx{17,18,20,21,22,23,24,30,31,32,33}
|
||||||
|
+ py{36,37,38}-sphinx{17,18,20,21,22,23,24,30,31,32,33,34}
|
||||||
|
|
||||||
|
[testenv]
|
||||||
|
deps =
|
||||||
|
@@ -20,6 +20,7 @@ deps =
|
||||||
|
sphinx31: sphinx~=3.1.0
|
||||||
|
sphinx32: sphinx~=3.2.0
|
||||||
|
sphinx33: sphinx~=3.3.0
|
||||||
|
+ sphinx34: sphinx~=3.4.0
|
||||||
|
commands = pytest {posargs}
|
||||||
|
|
||||||
|
[testenv:py38-sphinx30]
|
||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user