]> git.pld-linux.org Git - packages/python-sphinx_rtd_theme.git/blob - python-sphinx_rtd_theme.spec
- updated to 1.0.0
[packages/python-sphinx_rtd_theme.git] / python-sphinx_rtd_theme.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 %bcond_without  tests   # unit tests
6
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}
11 Version:        1.0.0
12 Release:        1
13 License:        MIT
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
22 %if %{with python2}
23 BuildRequires:  python-modules >= 1:2.7
24 BuildRequires:  python-setuptools
25 %if %{with tests}
26 BuildRequires:  python-pytest
27 BuildRequires:  python-readthedocs-sphinx-ext
28 %endif
29 %endif
30 %if %{with python3}
31 BuildRequires:  python3-modules >= 1:3.4
32 BuildRequires:  python3-setuptools
33 %if %{with tests}
34 BuildRequires:  python3-pytest
35 BuildRequires:  python3-readthedocs-sphinx-ext
36 %endif
37 %endif
38 Requires:       python-modules >= 1:2.7
39 BuildArch:      noarch
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 This is a mobile-friendly Sphinx theme made for readthedocs.org.
44
45 %description -l pl.UTF-8
46 Ten pakiet zawiera przyjazny dla urządzeń przenośnych motyw Sphinksa
47 wykonany przez readthedocs.org.
48
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
54
55 %description -n python3-%{module}
56 This is a mobile-friendly Sphinx theme made for readthedocs.org.
57
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.
61
62 %prep
63 %setup -q -n %{module}-%{version}
64 %patch0 -p1
65
66 %build
67 %if %{with python2}
68 %py_build
69
70 %if %{with tests}
71 %{__python} -m pytest tests
72 %endif
73 %endif
74
75 %if %{with python3}
76 %py3_build
77
78 %if %{with tests}
79 %{__python3} -m pytest tests
80 %endif
81 %endif
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85
86 %if %{with python2}
87 %py_install
88
89 %py_postclean
90 %endif
91
92 %if %{with python3}
93 %py3_install
94 %endif
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %if %{with python2}
100 %files
101 %defattr(644,root,root,755)
102 %doc LICENSE README.rst
103 %{py_sitescriptdir}/%{module}
104 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
105 %endif
106
107 %if %{with python3}
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
113 %endif
This page took 0.109537 seconds and 3 git commands to generate.