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: e26a308d8000b0bed7416a633217c676
18 URL: http://docutils.sourceforge.net/
20 BuildRequires: python-devel >= 1:2.6
21 BuildRequires: python-setuptools
24 BuildRequires: python3-2to3 >= 1:3.4
25 BuildRequires: python3-devel >= 1:3.4
26 BuildRequires: python3-setuptools
28 BuildRequires: rpm-pythonprov
29 BuildRequires: rpmbuild(macros) >= 1.714
30 Requires: python-%{name} = %{version}-%{release}
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 Utilities for general- and special-purpose documentation, including
36 autodocumentation of Python modules. Includes reStructuredText, the
37 easy to read, easy to use, what-you-see-is-what-you-get plaintext
40 %description -l pl.UTF-8
41 Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
42 autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
43 do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
45 %package -n python-%{name}
46 Summary: Text documents processing modules for Python 2.x
47 Summary(pl.UTF-8): Moduły Pythona 2.x do przetwarzania dokumentów tekstowych
48 Group: Development/Languages/Python
49 %pyrequires_eq python-libs
51 %description -n python-%{name}
52 Docutils are utilities for general- and special-purpose documentation,
53 including autodocumentation of Python modules. Includes
54 reStructuredText, the easy to read, easy to use,
55 what-you-see-is-what-you-get plaintext markup language.
57 This package provides the Docutils modules for Python 2.
59 %description -n python-%{name} -l pl.UTF-8
60 Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
61 autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
62 do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
64 Ten pakiet dostarcza moduły Docutils dla Pythona 2.
67 Summary: Documentation Utilities for Python 3.x
68 Summary(pl.UTF-8): Narzędzia do tworzenia dokumentacji dla Pythona 3.x
69 Group: Development/Tools
70 Requires: python3-%{name} = %{version}-%{release}
73 Utilities for general- and special-purpose documentation, including
74 autodocumentation of Python modules. Includes reStructuredText, the
75 easy to read, easy to use, what-you-see-is-what-you-get plaintext
78 This package provides the Docutils for Python 3.
80 %description 3 -l pl.UTF-8
81 Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
82 autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
83 do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
85 Ten pakiet zawiera Docutils dla Pythona 3.
87 %package -n python3-%{name}
88 Summary: Text documents processing modules for Python 3.x
89 Summary(pl.UTF-8): Moduły Pythona 3.x do przetwarzania dokumentów tekstowych
90 Group: Development/Languages/Python
92 %description -n python3-%{name}
93 Docutils are utilities for general- and special-purpose documentation,
94 including autodocumentation of Python modules. Includes
95 reStructuredText, the easy to read, easy to use,
96 what-you-see-is-what-you-get plaintext markup language.
98 This package provides the Docutils modules for Python 3.
100 %description -n python3-%{name} -l pl.UTF-8
101 Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
102 autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
103 do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
105 Ten pakiet dostarcza moduły Docutils dla Pythona 3.
112 %{__python} setup.py config build -b build-2
115 PYTHONPATH=$(pwd)/build-2/lib \
116 %{__python} test/alltests.py
121 %{__python3} setup.py config build -b build-3
124 PYTHONPATH=$(pwd)/build-3/lib \
125 %{__python3} test3/alltests.py
130 rm -rf $RPM_BUILD_ROOT
135 for f in $RPM_BUILD_ROOT%{_bindir}/*.py ; do
136 %{__mv} "${f}" "${f%.py}"
145 for f in $RPM_BUILD_ROOT%{_bindir}/*.py ; do
146 %{__mv} "${f}" "${f%.py}-3"
151 rm -rf $RPM_BUILD_ROOT
155 %defattr(644,root,root,755)
156 %attr(755,root,root) %{_bindir}/rst2html
157 %attr(755,root,root) %{_bindir}/rst2html4
158 %attr(755,root,root) %{_bindir}/rst2html5
159 %attr(755,root,root) %{_bindir}/rst2latex
160 %attr(755,root,root) %{_bindir}/rst2man
161 %attr(755,root,root) %{_bindir}/rst2odt
162 %attr(755,root,root) %{_bindir}/rst2odt_prepstyles
163 %attr(755,root,root) %{_bindir}/rst2pseudoxml
164 %attr(755,root,root) %{_bindir}/rst2s5
165 %attr(755,root,root) %{_bindir}/rst2xetex
166 %attr(755,root,root) %{_bindir}/rst2xml
167 %attr(755,root,root) %{_bindir}/rstpep2html
169 %files -n python-%{name}
170 %defattr(644,root,root,755)
171 %doc BUGS.txt COPYING.txt README.txt RELEASE-NOTES.txt THANKS.txt docs
172 %{py_sitescriptdir}/docutils
173 %{py_sitescriptdir}/docutils-%{version}-py*.egg-info
178 %defattr(644,root,root,755)
179 %attr(755,root,root) %{_bindir}/rst*-3
181 %files -n python3-%{name}
182 %defattr(644,root,root,755)
183 %doc BUGS.txt COPYING.txt README.txt RELEASE-NOTES.txt THANKS.txt docs
184 %{py3_sitescriptdir}/docutils
185 %{py3_sitescriptdir}/docutils-%{version}-py*.egg-info