3 %bcond_without doc # Sphinx documentation
4 %bcond_with tests # unit tests (cannot find app fixture)
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 Summary: Sphinx extension to build a 404 page with absolute URLs
9 Summary(pl.UTF-8): Rozszerzenie Sphinksa do tworzenia strony 404 z bezwzględnymi URL-ami
10 Name: python-sphinx-notfound-page
14 Group: Libraries/Python
15 #Source0Download: https://pypi.org/simple/sphinx-notfound-page/
16 Source0: https://files.pythonhosted.org/packages/source/s/sphinx-notfound-page/sphinx-notfound-page-%{version}.tar.gz
17 # Source0-md5: 2e1563e824b14391a065dae6dca39f91
18 URL: https://pypi.org/project/sphinx-notfound-page/
20 BuildRequires: python-modules >= 1:2.7
21 BuildRequires: python-setuptools
23 BuildRequires: python-Sphinx
24 BuildRequires: python-pytest
25 BuildRequires: sphinx-pdg
29 BuildRequires: python3-modules >= 1:3.2
30 BuildRequires: python3-setuptools
32 BuildRequires: python3-Sphinx
33 BuildRequires: python3-pytest
34 BuildRequires: sphinx-pdg
37 BuildRequires: rpm-pythonprov
38 BuildRequires: rpmbuild(macros) >= 1.714
39 # generated docs are incluced in sdist, so regeneration is disabled
40 %if %{with rebuild_doc}
41 BuildRequires: python3-sphinx-autoapi
42 BuildRequires: python3-sphinx-prompt
43 BuildRequires: python3-sphinx_rtd_theme
44 BuildRequires: python3-sphinx_tabs
45 BuildRequires: python3-sphinxemoji
46 BuildRequires: sphinx-pdg-3
48 Requires: python-modules >= 1:2.7
50 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 Sphinx extension to create a custom 404 page with absolute URLs
56 %description -l pl.UTF-8
57 Rozszerzenie Sphinksa do tworzenia własnej strony 404 z zakodowanymi
58 bezwzględnymi URL-ami.
60 %package -n python3-sphinx-notfound-page
61 Summary: Sphinx extension to build a 404 page with absolute URLs
62 Summary(pl.UTF-8): Rozszerzenie Sphinksa do tworzenia strony 404 z bezwzględnymi URL-ami
63 Group: Libraries/Python
64 Requires: python3-modules >= 1:3.2
66 %description -n python3-sphinx-notfound-page
67 Sphinx extension to create a custom 404 page with absolute URLs
70 %description -n python3-sphinx-notfound-page -l pl.UTF-8
71 Rozszerzenie Sphinksa do tworzenia własnej strony 404 z zakodowanymi
72 bezwzględnymi URL-ami.
75 Summary: API documentation for Python sphinx-notfound-page module
76 Summary(pl.UTF-8): Dokumentacja API modułu Pythona sphinx-notfound-page
80 API documentation for Python sphinx-notfound-page module.
82 %description apidocs -l pl.UTF-8
83 Dokumentacja API modułu Pythona sphinx-notfound-page.
86 %setup -q -n sphinx-notfound-page-%{version}
93 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
95 %{__python} -m pytest tests
103 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
105 %{__python3} -m pytest tests
109 %if %{with rebuild_doc}
110 %{__make} -C docs html
114 rm -rf $RPM_BUILD_ROOT
127 rm -rf $RPM_BUILD_ROOT
131 %defattr(644,root,root,755)
132 %doc LICENSE README.rst
133 %{py_sitescriptdir}/notfound
134 %{py_sitescriptdir}/sphinx_notfound_page-%{version}-py*.egg-info
138 %files -n python3-sphinx-notfound-page
139 %defattr(644,root,root,755)
140 %doc LICENSE README.rst
141 %{py3_sitescriptdir}/notfound
142 %{py3_sitescriptdir}/sphinx_notfound_page-%{version}-py*.egg-info
147 %defattr(644,root,root,755)
148 %doc docs/_build/html/{_images,_static,autoapi,*.html,*.js}