]>
Commit | Line | Data |
---|---|---|
8e8cef05 JK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | %define module sphinx_rtd_theme | |
7 | Summary: ReadTheDocs.org theme for Sphinx, 2013 version | |
759a6ef1 | 8 | Summary(pl.UTF-8): Motyw ReadTheDocs.org dla Sphinksa, wersja z 2013 roku |
8e8cef05 JK |
9 | Name: python-%{module} |
10 | Version: 0.1.8 | |
abdcb546 | 11 | Release: 2 |
8e8cef05 JK |
12 | License: MIT |
13 | Group: Libraries/Python | |
14 | Source0: https://pypi.python.org/packages/source/s/sphinx_rtd_theme/%{module}-%{version}.tar.gz | |
15 | # Source0-md5: 713ce7c53239449bdd799385577329ee | |
16 | URL: https://github.com/snide/sphinx_rtd_theme/ | |
17 | BuildRequires: rpm-pythonprov | |
18 | BuildRequires: rpmbuild(macros) >= 1.219 | |
19 | %if %{with python2} | |
20 | BuildRequires: python-setuptools | |
21 | %endif | |
22 | %if %{with python3} | |
23 | BuildRequires: python3-setuptools | |
24 | %endif | |
25 | Requires: python-modules | |
26 | BuildArch: noarch | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
759a6ef1 JB |
30 | This is a mobile-friendly Sphinx theme made for readthedocs.org. |
31 | ||
32 | %description -l pl.UTF-8 | |
33 | Ten pakiet zawiera przyjazny dla urządzeń przenośnych motyw Sphinksa | |
34 | wykonany przez readthedocs.org. | |
8e8cef05 JK |
35 | |
36 | %package -n python3-%{module} | |
37 | Summary: ReadTheDocs.org theme for Sphinx, 2013 version | |
759a6ef1 | 38 | Summary(pl.UTF-8): Motyw ReadTheDocs.org dla Sphinksa, wersja z 2013 roku |
8e8cef05 JK |
39 | Group: Libraries/Python |
40 | Requires: python3-modules | |
41 | ||
42 | %description -n python3-%{module} | |
759a6ef1 JB |
43 | This is a mobile-friendly Sphinx theme made for readthedocs.org. |
44 | ||
45 | %description -n python3-%{module} -l pl.UTF-8 | |
46 | Ten pakiet zawiera przyjazny dla urządzeń przenośnych motyw Sphinksa | |
47 | wykonany przez readthedocs.org. | |
8e8cef05 JK |
48 | |
49 | %prep | |
50 | %setup -q -n %{module}-%{version} | |
51 | ||
52 | %build | |
53 | %if %{with python2} | |
415c71e6 | 54 | %py_build %{?with_tests:test} |
8e8cef05 JK |
55 | %endif |
56 | ||
57 | %if %{with python3} | |
415c71e6 | 58 | %py3_build %{?with_tests:test} |
8e8cef05 JK |
59 | %endif |
60 | ||
61 | %install | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %if %{with python2} | |
415c71e6 | 65 | %py_install |
8e8cef05 JK |
66 | |
67 | %py_postclean | |
68 | %endif | |
69 | ||
70 | %if %{with python3} | |
415c71e6 | 71 | %py3_install |
8e8cef05 JK |
72 | %endif |
73 | ||
74 | %clean | |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | ||
77 | %if %{with python2} | |
78 | %files | |
79 | %defattr(644,root,root,755) | |
80 | %doc README.rst | |
81 | %{py_sitescriptdir}/%{module} | |
82 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
83 | %endif | |
84 | ||
85 | %if %{with python3} | |
86 | %files -n python3-%{module} | |
87 | %defattr(644,root,root,755) | |
88 | %doc README.rst | |
89 | %{py3_sitescriptdir}/%{module} | |
90 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
91 | %endif |