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