diff --git a/0.4.tar.gz b/0.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..f9da08b74478d959fa553de1f4886006b945ed2a Binary files /dev/null and b/0.4.tar.gz differ diff --git a/fix-sphinx3-tests.patch b/fix-sphinx3-tests.patch new file mode 100644 index 0000000000000000000000000000000000000000..e94db8fcb6bb34fd9150ce401cab9afd052f14ff --- /dev/null +++ b/fix-sphinx3-tests.patch @@ -0,0 +1,45 @@ +diff --git a/tests/test_urls.py b/tests/test_urls.py +index 104f7f8..0acca72 100644 +--- a/tests/test_urls.py ++++ b/tests/test_urls.py +@@ -440,17 +440,31 @@ def test_sphinx_resource_urls(app, status, warning): + + content = open(path).read() + +- chunks = [ +- # Sphinx's resources URLs +- '', +- '', +- '', +- ] ++ if sphinx.version_info < (2, 4, 0): ++ chunks = [ ++ # Sphinx's resources URLs ++ '', ++ '', ++ '', ++ ] ++ else: ++ # #6925: html: Remove redundant type="text/javascript" from ', ++ '', ++ '', ++ ] + + if sphinx.version_info >= (1, 8): +- chunks.append( +- '', +- ) ++ if sphinx.version_info < (2, 4, 0): ++ chunks.append( ++ '', ++ ) ++ else: ++ chunks.append( ++ '', ++ ) + + for chunk in chunks: + assert chunk in content diff --git a/python-sphinx-notfound-page.spec b/python-sphinx-notfound-page.spec new file mode 100644 index 0000000000000000000000000000000000000000..64af4d3ec91619b477490b6ec42c40ee54df8d89 --- /dev/null +++ b/python-sphinx-notfound-page.spec @@ -0,0 +1,52 @@ +%global pypi_name sphinx-notfound-page +%global srcname sphinx_notfound_page +%global importname notfound +%global project_owner readthedocs +%global github_name sphinx-notfound-page +%global desc Create a custom 404 page with absolute URLs hardcoded + +Name: python-%{pypi_name} +Version: 0.4 +Release: 1 +Summary: Create a custom 404 page with absolute URLs hardcoded +License: MIT +URL: https://pypi.python.org/pypi/%{pypi_name} +Source0: https://github.com/%{project_owner}/%{github_name}/archive/%{version}.tar.gz +Patch0: fix-sphinx3-tests.patch +BuildArch: noarch +%description +%desc + +%package -n python%{python3_pkgversion}-%{pypi_name} +Summary: %{summary} +BuildArch: noarch +BuildRequires: python%{python3_pkgversion}-devel python%{python3_pkgversion}-setuptools +BuildRequires: python%{python3_pkgversion}-sphinx python3-pytest +Requires(post): %{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives +Requires: python%{python3_pkgversion}-setuptools python%{python3_pkgversion}-sphinx +%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} +%description -n python%{python3_pkgversion}-%{pypi_name} +%desc + +%prep +%autosetup -n %{pypi_name}-%{version} -p1 + +%build +%py3_build + +%install +%py3_install + +%check +PYTHONPATH="$(pwd)" py.test-%{python3_version} -v . + +%files -n python%{python3_pkgversion}-%{pypi_name} +%license LICENSE +%doc README.rst CHANGELOG.rst docs +%{python3_sitelib}/%{srcname}-%{version}*-py%{python3_version}.egg-info/ +%{python3_sitelib}/%{importname}/ + +%changelog +* Wed May 19 2021 chengshaowei - 0.4-1 +- package init \ No newline at end of file