3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
5 %bcond_without tests # unit tests
7 %define module sphinx_rtd_theme
8 Summary: ReadTheDocs.org theme for Sphinx
9 Summary(pl.UTF-8): Motyw ReadTheDocs.org dla Sphinksa
10 Name: python-%{module}
14 Group: Libraries/Python
15 #Source0Download: https://pypi.org/simple/sphinx_rtd_theme/
16 Source0: https://files.pythonhosted.org/packages/source/s/sphinx_rtd_theme/%{module}-%{version}.tar.gz
17 # Source0-md5: fdfc7d2e102cb96eca0f6155dde7403e
18 Patch0: %{name}-docutils.patch
19 URL: https://github.com/snide/sphinx_rtd_theme/
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.714
23 BuildRequires: python-modules >= 1:2.7
24 BuildRequires: python-setuptools
26 BuildRequires: python-pytest
27 BuildRequires: python-readthedocs-sphinx-ext
31 BuildRequires: python3-modules >= 1:3.4
32 BuildRequires: python3-setuptools
34 BuildRequires: python3-pytest
35 BuildRequires: python3-readthedocs-sphinx-ext
38 Requires: python-modules >= 1:2.7
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 This is a mobile-friendly Sphinx theme made for readthedocs.org.
45 %description -l pl.UTF-8
46 Ten pakiet zawiera przyjazny dla urządzeń przenośnych motyw Sphinksa
47 wykonany przez readthedocs.org.
49 %package -n python3-%{module}
50 Summary: ReadTheDocs.org theme for Sphinx
51 Summary(pl.UTF-8): Motyw ReadTheDocs.org dla Sphinksa
52 Group: Libraries/Python
53 Requires: python3-modules >= 1:3.4
55 %description -n python3-%{module}
56 This is a mobile-friendly Sphinx theme made for readthedocs.org.
58 %description -n python3-%{module} -l pl.UTF-8
59 Ten pakiet zawiera przyjazny dla urządzeń przenośnych motyw Sphinksa
60 wykonany przez readthedocs.org.
63 %setup -q -n %{module}-%{version}
71 %{__python} -m pytest tests
79 %{__python3} -m pytest tests
84 rm -rf $RPM_BUILD_ROOT
97 rm -rf $RPM_BUILD_ROOT
101 %defattr(644,root,root,755)
102 %doc LICENSE README.rst
103 %{py_sitescriptdir}/%{module}
104 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
108 %files -n python3-%{module}
109 %defattr(644,root,root,755)
110 %doc LICENSE README.rst
111 %{py3_sitescriptdir}/%{module}
112 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info