3 %bcond_without python2 # CPython 2.x version
4 %bcond_without python3 # CPython 3.x version
5 %bcond_without tests # unit tests
7 Summary: Documentation Utilities
8 Summary(pl.UTF-8): Narzędzia do tworzenia dokumentacji
12 License: Public Domain, BSD, GPL v3 (see COPYING.txt)
13 Group: Development/Tools
14 # original URL, but only with major releases: http://downloads.sourceforge.net/docutils/%{name}-%{version}.tar.gz
15 #Source0Download: https://pypi.org/simple/docutils/
16 Source0: https://files.pythonhosted.org/packages/source/d/docutils/%{name}-%{version}.tar.gz
17 # Source0-md5: ca5827e2432fd58f4c8d74a6591135de
18 URL: http://docutils.sourceforge.net/
20 BuildRequires: python-devel >= 1:2.7
21 BuildRequires: python-setuptools
23 # py3 patch assumes python3 lexer is the default, as it is since pygments 2.5.0
24 BuildRequires: python-pygments >= 2.5.0
25 # a few tests fail with _xmlplus implementation of xml
26 BuildConflicts: python-PyXML
30 BuildRequires: python3-devel >= 1:3.5
31 BuildRequires: python3-setuptools
33 # py3 patch assumes python3 lexer is the default, as it is since pygments 2.5.0
34 BuildRequires: python3-pygments >= 2.5.0
37 BuildRequires: rpm-pythonprov
38 BuildRequires: rpmbuild(macros) >= 1.714
39 Requires: python3-%{name} = %{version}-%{release}
40 Obsoletes: docutils-3 < 0.16-4
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 Utilities for general- and special-purpose documentation, including
46 autodocumentation of Python modules. Includes reStructuredText, the
47 easy to read, easy to use, what-you-see-is-what-you-get plaintext
50 %description -l pl.UTF-8
51 Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
52 autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
53 do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
55 %package -n python-%{name}
56 Summary: Text documents processing modules for Python 2.x
57 Summary(pl.UTF-8): Moduły Pythona 2.x do przetwarzania dokumentów tekstowych
58 Group: Development/Languages/Python
59 Requires: python-modules >= 1:2.7
60 Requires: python-pygments
62 %description -n python-%{name}
63 Docutils are utilities for general- and special-purpose documentation,
64 including autodocumentation of Python modules. Includes
65 reStructuredText, the easy to read, easy to use,
66 what-you-see-is-what-you-get plaintext markup language.
68 This package provides the Docutils modules for Python 2.
70 %description -n python-%{name} -l pl.UTF-8
71 Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
72 autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
73 do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
75 Ten pakiet dostarcza moduły Docutils dla Pythona 2.
78 Summary: Documentation Utilities for Python 2.x
79 Summary(pl.UTF-8): Narzędzia do tworzenia dokumentacji dla Pythona 2.x
80 Group: Development/Tools
81 Requires: python-%{name} = %{version}-%{release}
84 Utilities for general- and special-purpose documentation, including
85 autodocumentation of Python modules. Includes reStructuredText, the
86 easy to read, easy to use, what-you-see-is-what-you-get plaintext
89 This package provides the Docutils for Python 2.
91 %description 2 -l pl.UTF-8
92 Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
93 autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
94 do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
96 Ten pakiet zawiera Docutils dla Pythona 2.
98 %package -n python3-%{name}
99 Summary: Text documents processing modules for Python 3.x
100 Summary(pl.UTF-8): Moduły Pythona 3.x do przetwarzania dokumentów tekstowych
101 Group: Development/Languages/Python
102 Requires: python3-modules >= 1:3.5
103 Requires: python3-pygments
105 %description -n python3-%{name}
106 Docutils are utilities for general- and special-purpose documentation,
107 including autodocumentation of Python modules. Includes
108 reStructuredText, the easy to read, easy to use,
109 what-you-see-is-what-you-get plaintext markup language.
111 This package provides the Docutils modules for Python 3.
113 %description -n python3-%{name} -l pl.UTF-8
114 Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
115 autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
116 do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
118 Ten pakiet dostarcza moduły Docutils dla Pythona 3.
125 %{__python} setup.py config build -b build-2
128 PYTHONPATH=$(pwd)/build-2/lib \
129 %{__python} test/alltests.py
134 %{__python3} setup.py config build -b build-3
137 PYTHONPATH=$(pwd)/build-3/lib \
138 %{__python3} test/alltests.py
143 rm -rf $RPM_BUILD_ROOT
148 for f in $RPM_BUILD_ROOT%{_bindir}/*.py ; do
149 %{__mv} "${f}" "${f%.py}-2"
158 for f in $RPM_BUILD_ROOT%{_bindir}/*.py ; do
159 %{__mv} "${f}" "${f%.py}"
164 rm -rf $RPM_BUILD_ROOT
168 %defattr(644,root,root,755)
169 %attr(755,root,root) %{_bindir}/rst2html
170 %attr(755,root,root) %{_bindir}/rst2html4
171 %attr(755,root,root) %{_bindir}/rst2html5
172 %attr(755,root,root) %{_bindir}/rst2latex
173 %attr(755,root,root) %{_bindir}/rst2man
174 %attr(755,root,root) %{_bindir}/rst2odt
175 %attr(755,root,root) %{_bindir}/rst2odt_prepstyles
176 %attr(755,root,root) %{_bindir}/rst2pseudoxml
177 %attr(755,root,root) %{_bindir}/rst2s5
178 %attr(755,root,root) %{_bindir}/rst2xetex
179 %attr(755,root,root) %{_bindir}/rst2xml
180 %attr(755,root,root) %{_bindir}/rstpep2html
182 %files -n python3-%{name}
183 %defattr(644,root,root,755)
184 %doc BUGS.txt COPYING.txt README.txt RELEASE-NOTES.txt THANKS.txt docs
185 %{py3_sitescriptdir}/docutils
186 %{py3_sitescriptdir}/docutils-%{version}-py*.egg-info
191 %defattr(644,root,root,755)
192 %attr(755,root,root) %{_bindir}/rst*-2
194 %files -n python-%{name}
195 %defattr(644,root,root,755)
196 %doc BUGS.txt COPYING.txt README.txt RELEASE-NOTES.txt THANKS.txt docs
197 %{py_sitescriptdir}/docutils
198 %{py_sitescriptdir}/docutils-%{version}-py*.egg-info