source: projects/specs/trunk/p/python-sphinx/python-sphinx-vl.spec @ 12469

Revision 12469, 12.9 KB checked in by tomop, 4 years ago (diff)

python-3.8.5 and related packages.

Line 
1%bcond_with bootstrap
2
3%global upstream_name Sphinx
4%global py3_default 0
5
6Summary:        Python documentation generator
7Name:           python-sphinx
8Version:        3.2.1
9Release:        1%{?_dist_release}
10Group:          publishing,programming
11Vendor:         Project Vine
12Distribution:   Vine Linux
13
14# Unless otherwise noted, the license for code is BSD
15# sphinx/util/stemmer.py Public Domain
16# sphinx/pycode/pgen2 Python
17# jquery (MIT or GPLv2)
18License: BSD and Public Domain and Python and (MIT or GPLv2)
19URL:        http://sphinx.pocoo.org/
20
21Source0:    https://pypi.python.org/packages/source/S/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
22
23# Allow extra themes to exist. We pull in python[23]-sphinx-theme-alabaster
24# which causes that test to fail.
25Patch1: sphinx-test_theming.diff
26
27BuildArch:     noarch
28BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root
29BuildRequires: python-rpm-macros
30
31%description
32Sphinx is a tool that makes it easy to create intelligent and
33beautiful documentation for Python projects (or other documents
34consisting of multiple reStructuredText sources), written by Georg
35Brandl. It was originally created to translate the new Python
36documentation, but has now been cleaned up in the hope that it will be
37useful to many other projects.
38
39Sphinx uses reStructuredText as its markup language, and many of its
40strengths come from the power and straightforwardness of
41reStructuredText and its parsing and translating suite, the Docutils.
42
43Although it is still under constant development, the following
44features are already present, work fine and can be seen "in action" in
45the Python docs:
46
47    * Output formats: HTML (including Windows HTML Help) and LaTeX,
48      for printable PDF versions
49    * Extensive cross-references: semantic markup and automatic links
50      for functions, classes, glossary terms and similar pieces of
51      information
52    * Hierarchical structure: easy definition of a document tree, with
53      automatic links to siblings, parents and children
54    * Automatic indices: general index as well as a module index
55    * Code handling: automatic highlighting using the Pygments highlighter
56    * Various extensions are available, e.g. for automatic testing of
57      snippets and inclusion of appropriately formatted docstrings.
58
59
60%package -n python3-sphinx
61Summary:       Python documentation generator
62Group:         publishing,programming
63
64BuildRequires: python3-rpm-macros
65BuildRequires: python3-devel
66BuildRequires: python3-setuptools
67
68BuildRequires: python3-six
69BuildRequires: python3-jinja2
70BuildRequires: python3-docutils
71BuildRequires: python3-snowballstemmer
72BuildRequires: python3-babel
73BuildRequires: python3-sphinx-theme-alabaster
74BuildRequires: python3-imagesize
75BuildRequires: python3-requests
76BuildRequires: python3-packaging
77
78Requires:      python3-setuptools
79Requires:      python-sphinx-locale = %{version}-%{release}
80Requires:      python3-six
81Requires:      python3-jinja2
82Requires:      python3-docutils
83Requires:      python3-snowballstemmer
84Requires:      python3-babel
85Requires:      python3-sphinx-theme-alabaster
86Requires:      python3-imagesize
87Requires:      python3-requests
88Requires:      python3-packaging
89
90%if !%{with bootstrap}
91BuildRequires: python3-pygments
92BuildRequires: python3-sphinxcontrib-websupport
93BuildRequires: python3-sphinxcontrib-serializinghtml
94BuildRequires: python3-sphinxcontrib-applehelp
95BuildRequires: python3-sphinxcontrib-devhelp
96BuildRequires: python3-sphinxcontrib-htmlhelp
97BuildRequires: python3-sphinxcontrib-qthelp
98Requires:      python3-pygments
99Requires:      python3-sphinxcontrib-websupport
100Requires:      python3-sphinxcontrib-serializinghtml
101Requires:      python3-sphinxcontrib-applehelp
102Requires:      python3-sphinxcontrib-devhelp
103Requires:      python3-sphinxcontrib-htmlhelp
104Requires:      python3-sphinxcontrib-qthelp
105%endif
106
107%description -n python3-sphinx
108Sphinx is a tool that makes it easy to create intelligent and
109beautiful documentation for Python projects (or other documents
110consisting of multiple reStructuredText sources), written by Georg
111Brandl. It was originally created to translate the new Python
112documentation, but has now been cleaned up in the hope that it will be
113useful to many other projects.
114
115Sphinx uses reStructuredText as its markup language, and many of its
116strengths come from the power and straightforwardness of
117reStructuredText and its parsing and translating suite, the Docutils.
118
119Although it is still under constant development, the following
120features are already present, work fine and can be seen "in action" in
121the Python docs:
122
123    * Output formats: HTML (including Windows HTML Help) and LaTeX,
124      for printable PDF versions
125    * Extensive cross-references: semantic markup and automatic links
126      for functions, classes, glossary terms and similar pieces of
127      information
128    * Hierarchical structure: easy definition of a document tree, with
129      automatic links to siblings, parents and children
130    * Automatic indices: general index as well as a module index
131    * Code handling: automatic highlighting using the Pygments highlighter
132    * Various extensions are available, e.g. for automatic testing of
133      snippets and inclusion of appropriately formatted docstrings.
134
135%package locale
136Summary:        Locale files for %{name}
137Group:          publishing
138License:        BSD
139
140%description locale
141Sphinx is a tool that makes it easy to create intelligent and
142beautiful documentation for Python projects (or other documents
143consisting of multiple reStructuredText sources), written by Georg
144Brandl. It was originally created to translate the new Python
145documentation, but has now been cleaned up in the hope that it will be
146useful to many other projects.
147
148This package contains locale files for Sphinx
149
150%package doc
151Summary:    Documentation for %{name}
152Group:      documentation
153License:    BSD
154
155
156%description doc
157Sphinx is a tool that makes it easy to create intelligent and
158beautiful documentation for Python projects (or other documents
159consisting of multiple reStructuredText sources), written by Georg
160Brandl. It was originally created to translate the new Python
161documentation, but has now been cleaned up in the hope that it will be
162useful to many other projects.
163
164This package contains documentation in reST and HTML formats.
165
166
167%prep
168%autosetup -n %{upstream_name}-%{version} -p1
169
170# fix line encoding of bundled jquery.js
171perl -pi -e 's/\r//' ./sphinx/themes/basic/static/jquery.js
172
173
174%build
175%py3_build
176
177%if !%{with bootstrap}
178export PYTHONPATH=$PWD
179pushd doc
180export SPHINXBUILD="%{__python3} ../sphinx/cmd/build.py"
181make html SPHINXBUILD="$SPHINXBUILD"
182make man SPHINXBUILD="$SPHINXBUILD"
183rm -rf _build/html/.buildinfo
184mv _build/html ..
185popd
186%endif
187
188%install
189%__rm -rf %{buildroot}
190%py3_install
191
192# Clean up non-python files
193rm -f %{buildroot}%{python3_sitelib}/sphinx/locale/.DS_Store
194rm -rf %{buildroot}%{python3_sitelib}/sphinx/locale/.tx
195
196%if !%{with bootstrap}
197pushd doc
198# Deliver man pages
199install -d %{buildroot}%{_mandir}/man1
200for f in _build/man/sphinx-*.1;
201do
202    cp -p $f %{buildroot}%{_mandir}/man1/$(basename $f)
203done
204popd
205%endif
206
207# Deliver rst files
208rm -rf doc/_build
209sed -i 's|python ../sphinx-build.py|/usr/bin/sphinx-build|' doc/Makefile
210mv doc reST
211rm reST/make.bat
212
213# Move language files to /usr/share;
214# patch to support this incorporated in 0.6.6
215pushd %{buildroot}%{python3_sitelib}
216
217for lang in `find sphinx/locale -maxdepth 1 -mindepth 1 -type d -not -path '*/\.
218*' -printf "%f "`;
219do
220  test $lang == __pycache__ && continue
221  install -d %{buildroot}%{_datadir}/sphinx/locale/$lang
222  install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES
223  mv sphinx/locale/$lang/LC_MESSAGES/sphinx.js \
224     %{buildroot}%{_datadir}/sphinx/locale/$lang/
225  mv sphinx/locale/$lang/LC_MESSAGES/sphinx.mo \
226    %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/
227  rm -rf sphinx/locale/$lang
228done
229popd
230
231# Create the sphinxcontrib directory, so we can own it
232# See https://bugzilla.redhat.com/show_bug.cgi?id=1669790 for rationale
233mkdir %{buildroot}%{python3_sitelib}/sphinxcontrib
234
235%find_lang sphinx
236
237# Language files; Since these are javascript, it's not immediately obvious to
238# find_lang that they need to be marked with a language.
239(cd %{buildroot} && find . -name 'sphinx.js') | sed -e 's|^.||' | sed -e \
240  's:\(.*/locale/\)\([^/_]\+\)\(.*\.js$\):%lang(\2) \1\2\3:' \
241  >> sphinx.lang
242
243
244%clean
245%__rm -rf %{buildroot}
246
247
248%check
249#__make test
250
251
252%files -n python3-sphinx
253%license LICENSE
254%doc AUTHORS CHANGES EXAMPLES README.*
255%{_bindir}/sphinx-*
256%{python3_sitelib}/sphinx/
257%{python3_sitelib}/Sphinx-%{version}-py%{python3_version}.egg-info/
258%dir %{python3_sitelib}/sphinxcontrib/
259%dir %{_datadir}/sphinx/
260%if !%{with bootstrap}
261%{_mandir}/man1/sphinx-*
262%endif
263
264%files locale -f sphinx.lang
265%license LICENSE
266%dir %{_datadir}/sphinx/
267%dir %{_datadir}/sphinx/locale
268%dir %{_datadir}/sphinx/locale/*
269
270%files doc
271%defattr(-,root,root,-)
272%license LICENSE
273%if !%{with bootstrap}
274%doc html reST
275%endif
276
277
278%changelog
279* Sun Aug 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.2.1-1
280- new upstream release.
281- built with python3 only.
282
283* Thu Nov 29 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.7.9-2
284- fixed R:.
285
286* Wed Nov 28 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.7.9-1
287- new upstream release.
288- dropped Patch2.
289- imported Patch0-1 from rawhide.
290- added python3 support.
291
292* Wed May 09 2018 Toshiaki Ara <ara_t@384.jp> 1.1.3-3
293- added patch2 from RedHat
294
295* Thu Jul  2 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.3-2
296- added patch0.
297
298* Sun Jun 30 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.1.3-1
299- new upstream release
300
301* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.7-2
302- rebuild with python-2.7.2
303
304* Thu May  5 2011 IWAI, Masaharu <iwai@alib.jp> 1.0.7-1
305- new upstream release
306- add BuildRequires: python-simplejson for Vine5
307- add Vendor and Distribution tags
308
309* Wed Dec 01 2010 Shu KONNO <owa@bg.wakwak.com> 1.0.5-1
310- update sphinx to 1.0.5
311
312* Mon Aug 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> 1.0-1.b2
313- initial build based on Fedora development
314
315* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.0-0.1.b2.1
316- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
317
318* Mon May 31 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.0-0.2.b2
319- Update to 1.0 beta 2
320- Fixes problem building html documentation in non-English locales
321
322* Wed May 26 2010 Michel Salim <salimma@fedoraproject.org> - 1.0-0.1.b1
323- Update to 1.0 beta 1
324
325* Tue May 25 2010 Michel Salim <salimma@fedoraproject.org> - 0.6.6-1
326- Update to 0.6.6
327
328* Fri May 21 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.5-2
329- Few minor tweaks to Gareth's spec file update
330
331* Mon May 10 2010 Gareth Armstrong <gareth.armstrong@hp.com> - 0.6.5-1.hp
332- Update to 0.6.5
333- Initial import of python-sphinx from Fedora Rawhide for use in HP CMS
334- Enforce that Sphinx requires Python 2.4 or later via an explicit BR
335- Minor tweaks to spec file
336- Move language files to %%{_datadir}, idea borrowed from Debian's sphinx
337  package
338- Deliver man pages for sphinx-build & sphinx-quickstart
339- Deliver rst documentation files to reST directory in doc sub-package
340- Add %%check section for Python2 and add BR on python-nose
341
342* Wed Jan 13 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.4-1
343- Update to 0.6.4
344- Fixes a problem using autodoc with pylons projects.
345
346* Fri Sep  4 2009 Michel Salim <salimma@fedoraproject.org> - 0.6.3-1
347- Update to 0.6.3
348
349* Mon Aug 17 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.2-1
350- Update to 0.6.2 -- upstream bugfix requested inside bz#512438
351
352* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-3
353- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
354
355* Fri Jun 05 2009 Luke Macken <lmacken@redhat.com> - 0.6.1-2
356- Add a patch to use our own setuptools package
357
358* Fri Apr 17 2009 Michel Salim <salimma@fedoraproject.org> - 0.6.1-1
359- Update to 0.6.1
360
361* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-2
362- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
363
364* Fri Jan  2 2009 Michel Salim <salimma@fedoraproject.org> - 0.5.1-1
365- Update to 0.5.1
366
367* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.5-2
368- Rebuild for Python 2.6
369
370* Mon Nov 24 2008 Michel Salim <salimma@fedoraproject.org> - 0.5-1
371- Update to 0.5
372
373* Fri Oct 10 2008 Michel Salim <salimma@fedoraproject.org> - 0.4.3-1
374- Update to 0.4.3
375
376* Wed Aug 27 2008 Toshio Kuratomi <toshio@fedoraproject.org> - 0.4.2-1.1
377- Fix for EL-5 build.
378
379* Mon Aug 25 2008 Michel Salim <salimma@fedoraproject.org> - 0.4.2-1
380- Update to 0.4.2
381
382* Mon May 26 2008 Michel Salim <salimma@fedoraproject.org> - 0.3-1
383- Update to 0.3
384
385* Fri May  2 2008 Michel Salim <salimma@fedoraproject.org> - 0.1.61950-3
386- Split documentation into subpackage
387- Exclude C files (not built by default anyway)
388
389* Wed Apr 16 2008 José Matos <jamatos@fc.up.pt> - 0.1.61950-2
390- Build html documentation, include it and include the rst
391  documentation.
392
393* Thu Mar 27 2008 Michel Salim <michel.sylvan@gmail.com> 0.1.61950-1
394- Initial package
Note: See TracBrowser for help on using the repository browser.