File python-Sphinx.spec of Package python-Sphinx-doc (Revision 9601bd04bfb412b476f8d2692f5043fe)
Currently displaying revision 9601bd04bfb412b476f8d2692f5043fe , Show latest
216
1
#
2
# spec file for package python-Sphinx
3
#
4
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via http://bugs.opensuse.org/
16
#
17
18
19
%if 0%{?suse_version} != 1315
20
%bcond_without latex
21
%else
22
%bcond_with latex
23
%endif
24
25
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
26
%define oldpython python
27
Name: python-Sphinx
28
Version: 1.6.5
29
Release: 0
30
Url: http://sphinx-doc.org
31
Summary: Python documentation generator
32
License: BSD-2-Clause
33
Group: Development/Languages/Python
34
Source: https://files.pythonhosted.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz
35
Patch1: disable-test.patch
36
BuildRoot: %{_tmppath}/%{name}-%{version}-build
37
BuildRequires: %{python_module devel}
38
BuildRequires: %{python_module setuptools}
39
BuildRequires: fdupes
40
BuildRequires: python-rpm-macros
41
Requires: python-Babel >= 1.3
42
Requires: python-Jinja2 >= 2.3
43
Requires: python-Pygments >= 2.0
44
Requires: python-alabaster >= 0.7
45
Requires: python-docutils >= 0.11
46
Requires: python-imagesize
47
Requires: python-requests >= 2.0.0
48
Requires: python-six >= 1.5
49
Requires: python-snowballstemmer >= 1.1
50
Requires: python-sphinx_rtd_theme
51
Requires: python-sphinxcontrib
52
Requires: python-sphinxcontrib-websupport
53
Recommends: python-SQLAlchemy >= 0.9
54
Recommends: python-Whoosh >= 2.0
55
Recommends: %{name}-doc-man
56
%ifpython2
57
Requires: python-enum34
58
Requires: python-typing
59
%endif
60
%ifpython3
61
%if %{python3_version_nodots} < 35
62
Requires: python-typing
63
%endif
64
%endif
65
Requires(post): update-alternatives
66
Requires(postun): update-alternatives
67
68
%if 0%{?suse_version}
69
Recommends: python-rst2pdf
70
%endif
71
# workaround for suboptimal CentOS-7 project config
72
#!BuildIgnore: texinfo
73
74
%ifpython2
75
Obsoletes: %{oldpython}-sphinx < %{version}
76
Provides: %{oldpython}-sphinx = %{version}
77
%endif
78
BuildArch: noarch
79
80
%python_subpackages
81
82
%description
83
Sphinx is a tool that facilitates creating documentation for Python
84
projects (or other documents consisting of multiple reStructuredText
85
sources). It was originally created for the Python documentation, and
86
supports Python project documentation well, but C/C++ is likewise
87
supported.
88
89
Sphinx uses reStructuredText as its markup language. Sphinx draws from
90
the parsing and translating suite, the Docutils.
91
92
%package latex
93
Summary: Sphinx packages for LaTeX
94
Group: Productivity/Publishing/TeX/Base
95
Requires: %{name} = %{version}
96
Requires: texlive-latex
97
Requires: texlive-metafont
98
Requires: texlive-pdftex
99
Requires: tex(8r.enc)
100
Requires: tex(alltt.sty)
101
Requires: tex(amsfonts.sty)
102
Requires: tex(amsmath.sty)
103
Requires: tex(amssymb.sty)
104
Requires: tex(amsthm.sty)
105
Requires: tex(array.sty)
106
Requires: tex(article.cls)
107
Requires: tex(atbegshi.sty)
108
Requires: tex(babel.sty)
109
Requires: tex(bm.sty)
110
Requires: tex(capt-of.sty)
111
Requires: tex(cmap.sty)
112
Requires: tex(color.sty)
113
Requires: tex(colortbl.sty)
114
Requires: tex(dvipdfmx.def)
115
Requires: tex(english.ldf)
116
Requires: tex(eqparbox.sty)
117
Requires: tex(fancybox.sty)
118
Requires: tex(fancyhdr.sty)
119
Requires: tex(fancyvrb.sty)
120
Requires: tex(float.sty)
121
Requires: tex(fncychap.sty)
122
Requires: tex(fontenc.sty)
123
Requires: tex(footnote.sty)
124
Requires: tex(framed.sty)
125
Requires: tex(graphics.sty)
126
Requires: tex(graphicx.sty)
127
Requires: tex(hypcap.sty)
128
Requires: tex(hyperref.sty)
129
Requires: tex(ifthen.sty)
130
Requires: tex(inputenc.sty)
131
Requires: tex(longtable.sty)
132
Requires: tex(makeidx.sty)
133
Requires: tex(multirow.sty)
134
Requires: tex(needspace.sty)
135
Requires: tex(newfloat.sty)
136
Requires: tex(palatino.sty)
137
Requires: tex(parskip.sty)
138
Requires: tex(pcrr.tfm)
139
Requires: tex(pdftex.def)
140
Requires: tex(pdftex.map)
141
Requires: tex(phvr.tfm)
142
Requires: tex(pplr.tfm)
143
Requires: tex(preview.sty)
144
Requires: tex(ptmr.tfm)
145
Requires: tex(pzcmi.tfm)
146
Requires: tex(tabulary.sty)
147
Requires: tex(textcomp.sty)
148
Requires: tex(threeparttable.sty)
149
Requires: tex(times.sty)
150
Requires: tex(titlesec.sty)
151
Requires: tex(upquote.sty)
152
Requires: tex(utf8.def)
153
Requires: tex(utf8x.def)
154
Requires: tex(wrapfig.sty)
155
%if 0%{?suse_version} > 1320
156
Requires: texlive-latexmk
157
Requires: texlive-makeindex
158
Requires: tex(varwidth.sty)
159
%endif
160
161
%description latex
162
Sphinx is a tool that facilitates creating documentation for Python
163
projects (or other documents consisting of multiple reStructuredText
164
sources).
165
166
This package contains the LaTeX components for %{name}.
167
168
%prep
169
%setup -q -n Sphinx-%{version}
170
%patch1 -p1
171
172
sed -i '/#\!/d' sphinx/pycode/pgen2/token.py # Fix non-excutable-script warning
173
sed -i 's/\r$//' sphinx/themes/basic/static/jquery.js # Fix wrong end-of-line encoding
174
175
%build
176
%python_build
177
178
%install
179
%python_install
180
181
%python_clone -a %{buildroot}%{_bindir}/sphinx-apidoc
182
%python_clone -a %{buildroot}%{_bindir}/sphinx-autogen
183
%python_clone -a %{buildroot}%{_bindir}/sphinx-build
184
%python_clone -a %{buildroot}%{_bindir}/sphinx-quickstart
185
186
%python_expand %fdupes %{buildroot}%{$python_sitelib}
187
188
%post
189
%{python_install_alternative sphinx-apidoc sphinx-autogen sphinx-build sphinx-quickstart}
190
191
%postun
192
%python_uninstall_alternative sphinx-apidoc
193
194
%files %{python_files}
195
%defattr(-,root,root,-)
196
%doc AUTHORS CHANGES LICENSE README.rst
197
%python_alternative %{_bindir}/sphinx-apidoc
198
%python_alternative %{_bindir}/sphinx-autogen
199
%python_alternative %{_bindir}/sphinx-build
200
%python_alternative %{_bindir}/sphinx-quickstart
201
%{python_sitelib}/sphinx/
202
%if %{with latex}
203
%exclude %{python_sitelib}/sphinx/texinputs/
204
%endif
205
%{python_sitelib}/Sphinx-%{version}-py*.egg-info
206
207
# Requirements are not available on SLES
208
%if %{with latex}
209
%files %{python_files latex}
210
%defattr(-,root,root,-)
211
%doc AUTHORS LICENSE
212
%{python_sitelib}/sphinx/texinputs/
213
%endif
214
215
%changelog
216