]> git.pld-linux.org Git - packages/python-sphinx-notfound-page.git/blame - python-sphinx-notfound-page.spec
rebuild with tests and docs
[packages/python-sphinx-notfound-page.git] / python-sphinx-notfound-page.spec
CommitLineData
88d1161d
JB
1#
2# Conditional build:
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
7
8Summary: Sphinx extension to build a 404 page with absolute URLs
9Summary(pl.UTF-8): Rozszerzenie Sphinksa do tworzenia strony 404 z bezwzględnymi URL-ami
10Name: python-sphinx-notfound-page
11Version: 0.8
26f533fd 12Release: 4
88d1161d
JB
13License: MIT
14Group: Libraries/Python
15#Source0Download: https://pypi.org/simple/sphinx-notfound-page/
16Source0: https://files.pythonhosted.org/packages/source/s/sphinx-notfound-page/sphinx-notfound-page-%{version}.tar.gz
17# Source0-md5: 2e1563e824b14391a065dae6dca39f91
18URL: https://pypi.org/project/sphinx-notfound-page/
19%if %{with python2}
20BuildRequires: python-modules >= 1:2.7
21BuildRequires: python-setuptools
22%if %{with tests}
23BuildRequires: python-Sphinx
24BuildRequires: python-pytest
25BuildRequires: sphinx-pdg
26%endif
27%endif
28%if %{with python3}
29BuildRequires: python3-modules >= 1:3.2
30BuildRequires: python3-setuptools
31%if %{with tests}
32BuildRequires: python3-Sphinx
33BuildRequires: python3-pytest
34BuildRequires: sphinx-pdg
35%endif
36%endif
37BuildRequires: rpm-pythonprov
38BuildRequires: rpmbuild(macros) >= 1.714
39# generated docs are incluced in sdist, so regeneration is disabled
40%if %{with rebuild_doc}
41BuildRequires: python3-sphinx-autoapi
42BuildRequires: python3-sphinx-prompt
43BuildRequires: python3-sphinx_rtd_theme
44BuildRequires: python3-sphinx_tabs
45BuildRequires: python3-sphinxemoji
46BuildRequires: sphinx-pdg-3
47%endif
48Requires: python-modules >= 1:2.7
49BuildArch: noarch
50BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52%description
53Sphinx extension to create a custom 404 page with absolute URLs
54hardcoded.
55
56%description -l pl.UTF-8
57Rozszerzenie Sphinksa do tworzenia własnej strony 404 z zakodowanymi
58bezwzględnymi URL-ami.
59
60%package -n python3-sphinx-notfound-page
61Summary: Sphinx extension to build a 404 page with absolute URLs
62Summary(pl.UTF-8): Rozszerzenie Sphinksa do tworzenia strony 404 z bezwzględnymi URL-ami
63Group: Libraries/Python
64Requires: python3-modules >= 1:3.2
65
66%description -n python3-sphinx-notfound-page
67Sphinx extension to create a custom 404 page with absolute URLs
68hardcoded.
69
70%description -n python3-sphinx-notfound-page -l pl.UTF-8
71Rozszerzenie Sphinksa do tworzenia własnej strony 404 z zakodowanymi
72bezwzględnymi URL-ami.
73
74%package apidocs
75Summary: API documentation for Python sphinx-notfound-page module
76Summary(pl.UTF-8): Dokumentacja API modułu Pythona sphinx-notfound-page
77Group: Documentation
78
79%description apidocs
80API documentation for Python sphinx-notfound-page module.
81
82%description apidocs -l pl.UTF-8
83Dokumentacja API modułu Pythona sphinx-notfound-page.
84
85%prep
86%setup -q -n sphinx-notfound-page-%{version}
87
88%build
89%if %{with python2}
90%py_build
91
92%if %{with tests}
93PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
94PYTHONPATH=$(pwd) \
95%{__python} -m pytest tests
96%endif
97%endif
98
99%if %{with python3}
100%py3_build
101
102%if %{with tests}
103PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
104PYTHONPATH=$(pwd) \
105%{__python3} -m pytest tests
106%endif
107%endif
108
109%if %{with rebuild_doc}
110%{__make} -C docs html
111%endif
112
113%install
114rm -rf $RPM_BUILD_ROOT
115
116%if %{with python2}
117%py_install
118
119%py_postclean
120%endif
121
122%if %{with python3}
123%py3_install
124%endif
125
126%clean
127rm -rf $RPM_BUILD_ROOT
128
129%if %{with python2}
130%files
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
135%endif
136
137%if %{with python3}
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
143%endif
144
145%if %{with doc}
146%files apidocs
147%defattr(644,root,root,755)
148%doc docs/_build/html/{_images,_static,autoapi,*.html,*.js}
149%endif
This page took 0.115636 seconds and 4 git commands to generate.