1 | %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} |
---|
2 | |
---|
3 | %global upstream_name Sphinx |
---|
4 | |
---|
5 | Name: python-sphinx |
---|
6 | Version: 1.1.3 |
---|
7 | Release: 3%{?_dist_release} |
---|
8 | Summary: Python documentation generator |
---|
9 | |
---|
10 | Group: Development/Tools |
---|
11 | |
---|
12 | # Unless otherwise noted, the license for code is BSD |
---|
13 | # sphinx/util/stemmer.py Public Domain |
---|
14 | # sphinx/pycode/pgen2 Python |
---|
15 | # jquery (MIT or GPLv2) |
---|
16 | License: BSD and Public Domain and Python and (MIT or GPLv2) |
---|
17 | URL: http://sphinx.pocoo.org/ |
---|
18 | Source0: http://pypi.python.org/packages/source/S/%{upstream_name}/%{upstream_name}-%{version}.tar.gz |
---|
19 | Patch0: sphinx-docutils-0.10.patch |
---|
20 | Patch1: Sphinx-1.1.3-fix_quoting_in_inheritance.patch |
---|
21 | |
---|
22 | # Add missing "meta" and "inline" node visitors for the manpage writer |
---|
23 | # which fixes some exception errors when building docs. |
---|
24 | # https://github.com/sphinx-doc/sphinx/commit/0ef7a0a7a36b0c653e535bca77c08027f1a720a8 |
---|
25 | # https://bugzilla.redhat.com/show_bug.cgi?id=1291573 |
---|
26 | Patch2: inline-node-error-fix.patch |
---|
27 | |
---|
28 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
29 | BuildArch: noarch |
---|
30 | BuildRequires: python-devel >= 2.4 |
---|
31 | BuildRequires: python-setuptools |
---|
32 | |
---|
33 | #%if %{?_dist_release} == "vl5" |
---|
34 | #BuildRequires: python-simplejson |
---|
35 | #BuildRequires: docutils |
---|
36 | #%else |
---|
37 | BuildRequires: python-docutils |
---|
38 | #%endif |
---|
39 | |
---|
40 | BuildRequires: python-jinja2 |
---|
41 | BuildRequires: python-nose |
---|
42 | #%if %{?_dist_release} == "vl5" |
---|
43 | #Requires: docutils |
---|
44 | #%else |
---|
45 | Requires: python-docutils |
---|
46 | #%endif |
---|
47 | Requires: python-jinja2 |
---|
48 | Requires: python-pygments |
---|
49 | |
---|
50 | Vendor: Project Vine |
---|
51 | Distribution: Vine Linux |
---|
52 | |
---|
53 | %description |
---|
54 | Sphinx is a tool that makes it easy to create intelligent and |
---|
55 | beautiful documentation for Python projects (or other documents |
---|
56 | consisting of multiple reStructuredText sources), written by Georg |
---|
57 | Brandl. It was originally created to translate the new Python |
---|
58 | documentation, but has now been cleaned up in the hope that it will be |
---|
59 | useful to many other projects. |
---|
60 | |
---|
61 | Sphinx uses reStructuredText as its markup language, and many of its |
---|
62 | strengths come from the power and straightforwardness of |
---|
63 | reStructuredText and its parsing and translating suite, the Docutils. |
---|
64 | |
---|
65 | Although it is still under constant development, the following |
---|
66 | features are already present, work fine and can be seen "in action" in |
---|
67 | the Python docs: |
---|
68 | |
---|
69 | * Output formats: HTML (including Windows HTML Help) and LaTeX, |
---|
70 | for printable PDF versions |
---|
71 | * Extensive cross-references: semantic markup and automatic links |
---|
72 | for functions, classes, glossary terms and similar pieces of |
---|
73 | information |
---|
74 | * Hierarchical structure: easy definition of a document tree, with |
---|
75 | automatic links to siblings, parents and children |
---|
76 | * Automatic indices: general index as well as a module index |
---|
77 | * Code handling: automatic highlighting using the Pygments highlighter |
---|
78 | * Various extensions are available, e.g. for automatic testing of |
---|
79 | snippets and inclusion of appropriately formatted docstrings. |
---|
80 | |
---|
81 | |
---|
82 | %package doc |
---|
83 | Summary: Documentation for %{name} |
---|
84 | Group: Documentation |
---|
85 | License: BSD |
---|
86 | Requires: %{name} = %{version}-%{release} |
---|
87 | |
---|
88 | |
---|
89 | %description doc |
---|
90 | Sphinx is a tool that makes it easy to create intelligent and |
---|
91 | beautiful documentation for Python projects (or other documents |
---|
92 | consisting of multiple reStructuredText sources), written by Georg |
---|
93 | Brandl. It was originally created to translate the new Python |
---|
94 | documentation, but has now been cleaned up in the hope that it will be |
---|
95 | useful to many other projects. |
---|
96 | |
---|
97 | This package contains documentation in reST and HTML formats. |
---|
98 | |
---|
99 | |
---|
100 | %prep |
---|
101 | %setup -q -n %{upstream_name}-%{version} |
---|
102 | %__sed '1d' -i sphinx/pycode/pgen2/token.py |
---|
103 | %patch0 -p1 |
---|
104 | %patch1 -p1 |
---|
105 | %patch2 -p1 |
---|
106 | |
---|
107 | %build |
---|
108 | %{__python} setup.py build |
---|
109 | pushd doc |
---|
110 | %__make html |
---|
111 | %__rm -rf _build/html/.buildinfo |
---|
112 | %__mv _build/html .. |
---|
113 | %__rm -rf _* |
---|
114 | popd |
---|
115 | |
---|
116 | |
---|
117 | %install |
---|
118 | %__rm -rf %{buildroot} |
---|
119 | |
---|
120 | %{__python} setup.py install --skip-build --root %{buildroot} |
---|
121 | |
---|
122 | |
---|
123 | # Manpages not in beta release yet |
---|
124 | #pushd doc |
---|
125 | # Deliver man pages |
---|
126 | #install -d %{buildroot}%{_mandir}/man1 |
---|
127 | #mv sphinx-*.1 %{buildroot}%{_mandir}/man1/ |
---|
128 | #popd |
---|
129 | |
---|
130 | # Deliver rst files |
---|
131 | %__mv doc reST |
---|
132 | |
---|
133 | # Move language files to /usr/share in association with %patch1 |
---|
134 | pushd %{buildroot}%{python_sitelib} |
---|
135 | |
---|
136 | for lang in `find sphinx/locale -maxdepth 1 -mindepth 1 -type d -printf "%f "`; |
---|
137 | do |
---|
138 | install -d %{buildroot}%{_datadir}/sphinx/locale/$lang |
---|
139 | install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES |
---|
140 | %__mv sphinx/locale/$lang/LC_MESSAGES/sphinx.js \ |
---|
141 | %{buildroot}%{_datadir}/sphinx/locale/$lang/ |
---|
142 | %__mv sphinx/locale/$lang/LC_MESSAGES/sphinx.mo \ |
---|
143 | %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/ |
---|
144 | %__rm -rf sphinx/locale/$lang |
---|
145 | done |
---|
146 | popd |
---|
147 | %find_lang sphinx |
---|
148 | |
---|
149 | # Language files; Since these are javascript, it's not immediately obvious to |
---|
150 | # find_lang that they need to be marked with a language. |
---|
151 | (cd %{buildroot} && find . -name 'sphinx.js') | %__sed -e 's|^.||' | %__sed -e \ |
---|
152 | 's:\(.*/locale/\)\([^/_]\+\)\(.*\.js$\):%lang(\2) \1\2\3:' \ |
---|
153 | >> sphinx.lang |
---|
154 | |
---|
155 | |
---|
156 | %clean |
---|
157 | %__rm -rf %{buildroot} |
---|
158 | |
---|
159 | |
---|
160 | %check |
---|
161 | %__make test |
---|
162 | |
---|
163 | |
---|
164 | %files -f sphinx.lang |
---|
165 | %defattr(-,root,root,-) |
---|
166 | %doc AUTHORS CHANGES EXAMPLES LICENSE README TODO |
---|
167 | %{_bindir}/sphinx-* |
---|
168 | %{python_sitelib}/* |
---|
169 | %{_datadir}/sphinx/ |
---|
170 | %exclude %{_datadir}/sphinx/locale/*/sphinx.js |
---|
171 | #%{_mandir}/man1/* |
---|
172 | |
---|
173 | %files doc |
---|
174 | %defattr(-,root,root,-) |
---|
175 | %doc html reST |
---|
176 | |
---|
177 | |
---|
178 | %changelog |
---|
179 | * Wed May 09 2018 Toshiaki Ara <ara_t@384.jp> 1.1.3-3 |
---|
180 | - added patch2 from RedHat |
---|
181 | |
---|
182 | * Thu Jul 2 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.3-2 |
---|
183 | - added patch0. |
---|
184 | |
---|
185 | * Sun Jun 30 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.1.3-1 |
---|
186 | - new upstream release |
---|
187 | |
---|
188 | * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.7-2 |
---|
189 | - rebuild with python-2.7.2 |
---|
190 | |
---|
191 | * Thu May 5 2011 IWAI, Masaharu <iwai@alib.jp> 1.0.7-1 |
---|
192 | - new upstream release |
---|
193 | - add BuildRequires: python-simplejson for Vine5 |
---|
194 | - add Vendor and Distribution tags |
---|
195 | |
---|
196 | * Wed Dec 01 2010 Shu KONNO <owa@bg.wakwak.com> 1.0.5-1 |
---|
197 | - update sphinx to 1.0.5 |
---|
198 | |
---|
199 | * Mon Aug 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-1.b2 |
---|
200 | - initial build based on Fedora development |
---|
201 | |
---|
202 | * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.0-0.1.b2.1 |
---|
203 | - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild |
---|
204 | |
---|
205 | * Mon May 31 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.0-0.2.b2 |
---|
206 | - Update to 1.0 beta 2 |
---|
207 | - Fixes problem building html documentation in non-English locales |
---|
208 | |
---|
209 | * Wed May 26 2010 Michel Salim <salimma@fedoraproject.org> - 1.0-0.1.b1 |
---|
210 | - Update to 1.0 beta 1 |
---|
211 | |
---|
212 | * Tue May 25 2010 Michel Salim <salimma@fedoraproject.org> - 0.6.6-1 |
---|
213 | - Update to 0.6.6 |
---|
214 | |
---|
215 | * Fri May 21 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.5-2 |
---|
216 | - Few minor tweaks to Gareth's spec file update |
---|
217 | |
---|
218 | * Mon May 10 2010 Gareth Armstrong <gareth.armstrong@hp.com> - 0.6.5-1.hp |
---|
219 | - Update to 0.6.5 |
---|
220 | - Initial import of python-sphinx from Fedora Rawhide for use in HP CMS |
---|
221 | - Enforce that Sphinx requires Python 2.4 or later via an explicit BR |
---|
222 | - Minor tweaks to spec file |
---|
223 | - Move language files to %%{_datadir}, idea borrowed from Debian's sphinx |
---|
224 | package |
---|
225 | - Deliver man pages for sphinx-build & sphinx-quickstart |
---|
226 | - Deliver rst documentation files to reST directory in doc sub-package |
---|
227 | - Add %%check section for Python2 and add BR on python-nose |
---|
228 | |
---|
229 | * Wed Jan 13 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.4-1 |
---|
230 | - Update to 0.6.4 |
---|
231 | - Fixes a problem using autodoc with pylons projects. |
---|
232 | |
---|
233 | * Fri Sep 4 2009 Michel Salim <salimma@fedoraproject.org> - 0.6.3-1 |
---|
234 | - Update to 0.6.3 |
---|
235 | |
---|
236 | * Mon Aug 17 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.2-1 |
---|
237 | - Update to 0.6.2 -- upstream bugfix requested inside bz#512438 |
---|
238 | |
---|
239 | * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-3 |
---|
240 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
---|
241 | |
---|
242 | * Fri Jun 05 2009 Luke Macken <lmacken@redhat.com> - 0.6.1-2 |
---|
243 | - Add a patch to use our own setuptools package |
---|
244 | |
---|
245 | * Fri Apr 17 2009 Michel Salim <salimma@fedoraproject.org> - 0.6.1-1 |
---|
246 | - Update to 0.6.1 |
---|
247 | |
---|
248 | * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-2 |
---|
249 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
---|
250 | |
---|
251 | * Fri Jan 2 2009 Michel Salim <salimma@fedoraproject.org> - 0.5.1-1 |
---|
252 | - Update to 0.5.1 |
---|
253 | |
---|
254 | * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.5-2 |
---|
255 | - Rebuild for Python 2.6 |
---|
256 | |
---|
257 | * Mon Nov 24 2008 Michel Salim <salimma@fedoraproject.org> - 0.5-1 |
---|
258 | - Update to 0.5 |
---|
259 | |
---|
260 | * Fri Oct 10 2008 Michel Salim <salimma@fedoraproject.org> - 0.4.3-1 |
---|
261 | - Update to 0.4.3 |
---|
262 | |
---|
263 | * Wed Aug 27 2008 Toshio Kuratomi <toshio@fedoraproject.org> - 0.4.2-1.1 |
---|
264 | - Fix for EL-5 build. |
---|
265 | |
---|
266 | * Mon Aug 25 2008 Michel Salim <salimma@fedoraproject.org> - 0.4.2-1 |
---|
267 | - Update to 0.4.2 |
---|
268 | |
---|
269 | * Mon May 26 2008 Michel Salim <salimma@fedoraproject.org> - 0.3-1 |
---|
270 | - Update to 0.3 |
---|
271 | |
---|
272 | * Fri May 2 2008 Michel Salim <salimma@fedoraproject.org> - 0.1.61950-3 |
---|
273 | - Split documentation into subpackage |
---|
274 | - Exclude C files (not built by default anyway) |
---|
275 | |
---|
276 | * Wed Apr 16 2008 José Matos <jamatos@fc.up.pt> - 0.1.61950-2 |
---|
277 | - Build html documentation, include it and include the rst |
---|
278 | documentation. |
---|
279 | |
---|
280 | * Thu Mar 27 2008 Michel Salim <michel.sylvan@gmail.com> 0.1.61950-1 |
---|
281 | - Initial package |
---|