]> git.pld-linux.org Git - packages/python-sphinx_rtd_theme.git/blame - python-sphinx_rtd_theme.spec
- disable pytest plugins
[packages/python-sphinx_rtd_theme.git] / python-sphinx_rtd_theme.spec
CommitLineData
8e8cef05
JK
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
6c3b921d 5%bcond_without tests # unit tests
8e8cef05
JK
6
7%define module sphinx_rtd_theme
65e13b34
JB
8Summary: ReadTheDocs.org theme for Sphinx
9Summary(pl.UTF-8): Motyw ReadTheDocs.org dla Sphinksa
8e8cef05 10Name: python-%{module}
6028a540 11Version: 1.0.0
8187f455 12Release: 3
8e8cef05
JK
13License: MIT
14Group: Libraries/Python
65e13b34 15#Source0Download: https://pypi.org/simple/sphinx_rtd_theme/
9eb3cc7f 16Source0: https://files.pythonhosted.org/packages/source/s/sphinx_rtd_theme/%{module}-%{version}.tar.gz
6028a540
JB
17# Source0-md5: fdfc7d2e102cb96eca0f6155dde7403e
18Patch0: %{name}-docutils.patch
8e8cef05
JK
19URL: https://github.com/snide/sphinx_rtd_theme/
20BuildRequires: rpm-pythonprov
65e13b34 21BuildRequires: rpmbuild(macros) >= 1.714
8e8cef05 22%if %{with python2}
168104da 23BuildRequires: python-modules >= 1:2.7
8e8cef05 24BuildRequires: python-setuptools
6c3b921d
JB
25%if %{with tests}
26BuildRequires: python-pytest
27BuildRequires: python-readthedocs-sphinx-ext
28%endif
8e8cef05
JK
29%endif
30%if %{with python3}
6028a540 31BuildRequires: python3-modules >= 1:3.4
8e8cef05 32BuildRequires: python3-setuptools
6c3b921d
JB
33%if %{with tests}
34BuildRequires: python3-pytest
35BuildRequires: python3-readthedocs-sphinx-ext
36%endif
8e8cef05 37%endif
168104da 38Requires: python-modules >= 1:2.7
8e8cef05
JK
39BuildArch: noarch
40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42%description
759a6ef1
JB
43This is a mobile-friendly Sphinx theme made for readthedocs.org.
44
45%description -l pl.UTF-8
46Ten pakiet zawiera przyjazny dla urządzeń przenośnych motyw Sphinksa
47wykonany przez readthedocs.org.
8e8cef05
JK
48
49%package -n python3-%{module}
65e13b34
JB
50Summary: ReadTheDocs.org theme for Sphinx
51Summary(pl.UTF-8): Motyw ReadTheDocs.org dla Sphinksa
8e8cef05 52Group: Libraries/Python
6028a540 53Requires: python3-modules >= 1:3.4
8e8cef05
JK
54
55%description -n python3-%{module}
759a6ef1
JB
56This is a mobile-friendly Sphinx theme made for readthedocs.org.
57
58%description -n python3-%{module} -l pl.UTF-8
59Ten pakiet zawiera przyjazny dla urządzeń przenośnych motyw Sphinksa
60wykonany przez readthedocs.org.
8e8cef05
JK
61
62%prep
63%setup -q -n %{module}-%{version}
6028a540 64%patch0 -p1
8e8cef05
JK
65
66%build
67%if %{with python2}
6c3b921d
JB
68%py_build
69
70%if %{with tests}
13f60bf2 71PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
6c3b921d
JB
72%{__python} -m pytest tests
73%endif
8e8cef05
JK
74%endif
75
76%if %{with python3}
6c3b921d
JB
77%py3_build
78
79%if %{with tests}
13f60bf2 80PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
6c3b921d
JB
81%{__python3} -m pytest tests
82%endif
8e8cef05
JK
83%endif
84
85%install
86rm -rf $RPM_BUILD_ROOT
87
88%if %{with python2}
415c71e6 89%py_install
8e8cef05
JK
90
91%py_postclean
92%endif
93
94%if %{with python3}
415c71e6 95%py3_install
8e8cef05
JK
96%endif
97
98%clean
99rm -rf $RPM_BUILD_ROOT
100
101%if %{with python2}
102%files
103%defattr(644,root,root,755)
9eb3cc7f 104%doc LICENSE README.rst
8e8cef05
JK
105%{py_sitescriptdir}/%{module}
106%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
107%endif
108
109%if %{with python3}
110%files -n python3-%{module}
111%defattr(644,root,root,755)
9eb3cc7f 112%doc LICENSE README.rst
8e8cef05
JK
113%{py3_sitescriptdir}/%{module}
114%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
115%endif
This page took 0.146809 seconds and 5 git commands to generate.