]>
Commit | Line | Data |
---|---|---|
7b56bf4e JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # unit tests | |
4 | %bcond_without python2 # CPython 2.x module | |
5 | %bcond_without python3 # CPython 3.x module | |
6 | ||
7 | Summary: Sphinx extension for Read the Docs overrides | |
8 | Summary(pl.UTF-8): Rozszerzenie Sphinksa do modyfikacji Read the Docs | |
9 | Name: python-readthedocs-sphinx-ext | |
bbbcc8ca | 10 | Version: 1.0.1 |
fcb852c6 | 11 | Release: 3 |
7b56bf4e JB |
12 | License: MIT |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://pypi.org/simple/readthedocs-sphinx-ext/ | |
15 | Source0: https://files.pythonhosted.org/packages/source/r/readthedocs-sphinx-ext/readthedocs-sphinx-ext-%{version}.tar.gz | |
bbbcc8ca | 16 | # Source0-md5: 3ba91abb07855e766dd2e5d443a20e7a |
7b56bf4e JB |
17 | URL: https://pypi.org/project/readthedocs-sphinx-ext/ |
18 | %if %{with python2} | |
19 | BuildRequires: python-modules >= 1:2.5 | |
20 | BuildRequires: python-setuptools | |
21 | %if %{with tests} | |
22 | BuildRequires: python-Sphinx | |
23 | BuildRequires: python-jinja2 >= 2.9 | |
24 | BuildRequires: python-requests | |
25 | %endif | |
26 | %endif | |
27 | %if %{with python3} | |
28 | BuildRequires: python3-modules >= 1:3.2 | |
29 | BuildRequires: python3-setuptools | |
30 | %if %{with tests} | |
31 | BuildRequires: python3-Sphinx | |
32 | BuildRequires: python3-jinja2 >= 2.9 | |
33 | BuildRequires: python3-requests | |
34 | %endif | |
35 | %endif | |
36 | BuildRequires: rpm-pythonprov | |
37 | BuildRequires: rpmbuild(macros) >= 1.714 | |
38 | Requires: python-modules >= 1:2.5 | |
39 | BuildArch: noarch | |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
41 | ||
42 | %description | |
43 | This module adds extensions that make Sphinx easier to use. | |
44 | ||
45 | %description -l pl.UTF-8 | |
46 | Ten moduł dodaje rozszerzenia ułatwiające używanie Sphinksa. | |
47 | ||
48 | %package -n python3-readthedocs-sphinx-ext | |
49 | Summary: Sphinx extension for Read the Docs overrides | |
50 | Summary(pl.UTF-8): Rozszerzenie Sphinksa do modyfikacji Read the Docs | |
51 | Group: Libraries/Python | |
52 | Requires: python3-modules >= 1:3.2 | |
53 | ||
54 | %description -n python3-readthedocs-sphinx-ext | |
55 | This module adds extensions that make Sphinx easier to use. | |
56 | ||
57 | %description -n python3-readthedocs-sphinx-ext -l pl.UTF-8 | |
58 | Ten moduł dodaje rozszerzenia ułatwiające używanie Sphinksa. | |
59 | ||
60 | %prep | |
61 | %setup -q -n readthedocs-sphinx-ext-%{version} | |
62 | ||
63 | %build | |
64 | %if %{with python2} | |
65 | %py_build %{?with_tests:test} | |
66 | %endif | |
67 | ||
68 | %if %{with python3} | |
69 | %py3_build %{?with_tests:test} | |
70 | %endif | |
71 | ||
72 | %install | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
75 | %if %{with python2} | |
76 | %py_install | |
77 | ||
78 | %py_postclean | |
79 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/tests | |
80 | %endif | |
81 | ||
82 | %if %{with python3} | |
83 | %py3_install | |
84 | ||
85 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/tests | |
86 | %endif | |
87 | ||
88 | %clean | |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
91 | %if %{with python2} | |
92 | %files | |
93 | %defattr(644,root,root,755) | |
94 | %doc LICENSE README.rst | |
95 | %{py_sitescriptdir}/readthedocs_ext | |
96 | %{py_sitescriptdir}/readthedocs_sphinx_ext-%{version}-py*.egg-info | |
97 | %endif | |
98 | ||
99 | %if %{with python3} | |
100 | %files -n python3-readthedocs-sphinx-ext | |
101 | %defattr(644,root,root,755) | |
102 | %doc LICENSE README.rst | |
103 | %{py3_sitescriptdir}/readthedocs_ext | |
104 | %{py3_sitescriptdir}/readthedocs_sphinx_ext-%{version}-py*.egg-info | |
105 | %endif |