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 # Source0: http://downloads.sourceforge.net/docutils/%{name}-%{version}.tar.gz
15 Source0: https://pypi.debian.net/%{name}/%{name}-%{version}.tar.gz
16 # Source0-md5: e26a308d8000b0bed7416a633217c676
17 URL: http://docutils.sourceforge.net/
19 BuildRequires: python-devel >= 1:2.6
22 BuildRequires: python3-2to3 >= 1:3.4
23 BuildRequires: python3-devel >= 1:3.4
25 BuildRequires: rpm-pythonprov
26 BuildRequires: rpmbuild(macros) >= 1.714
27 Requires: python-%{name} = %{version}-%{release}
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 Utilities for general- and special-purpose documentation, including
33 autodocumentation of Python modules. Includes reStructuredText, the
34 easy to read, easy to use, what-you-see-is-what-you-get plaintext
37 %description -l pl.UTF-8
38 Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
39 autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
40 do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
42 %package -n python-%{name}
43 Summary: Text documents processing modules for Python 2.x
44 Summary(pl.UTF-8): Moduły Pythona 2.x do przetwarzania dokumentów tekstowych
45 Group: Development/Languages/Python
46 %pyrequires_eq python-libs
48 %description -n python-%{name}
49 Docutils are utilities for general- and special-purpose documentation,
50 including autodocumentation of Python modules. Includes
51 reStructuredText, the easy to read, easy to use,
52 what-you-see-is-what-you-get plaintext markup language.
54 This package provides the Docutils modules for Python 2.
56 %description -n python-%{name} -l pl.UTF-8
57 Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
58 autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
59 do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
61 Ten pakiet dostarcza moduły Docutils dla Pythona 2.
64 Summary: Documentation Utilities for Python 3.x
65 Summary(pl.UTF-8): Narzędzia do tworzenia dokumentacji dla Pythona 3.x
66 Group: Development/Tools
67 Requires: python3-%{name} = %{version}-%{release}
70 Utilities for general- and special-purpose documentation, including
71 autodocumentation of Python modules. Includes reStructuredText, the
72 easy to read, easy to use, what-you-see-is-what-you-get plaintext
75 This package provides the Docutils for Python 3.
77 %description 3 -l pl.UTF-8
78 Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
79 autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
80 do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
82 Ten pakiet zawiera Docutils dla Pythona 3.
84 %package -n python3-%{name}
85 Summary: Text documents processing modules for Python 3.x
86 Summary(pl.UTF-8): Moduły Pythona 3.x do przetwarzania dokumentów tekstowych
87 Group: Development/Languages/Python
89 %description -n python3-%{name}
90 Docutils are utilities for general- and special-purpose documentation,
91 including autodocumentation of Python modules. Includes
92 reStructuredText, the easy to read, easy to use,
93 what-you-see-is-what-you-get plaintext markup language.
95 This package provides the Docutils modules for Python 3.
97 %description -n python3-%{name} -l pl.UTF-8
98 Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
99 autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
100 do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
102 Ten pakiet dostarcza moduły Docutils dla Pythona 3.
109 %{__python} setup.py config build -b build-2
112 PYTHONPATH=$(pwd)/build-2/lib \
113 %{__python} test/alltests.py
118 %{__python3} setup.py config build -b build-3
121 PYTHONPATH=$(pwd)/build-3/lib \
122 %{__python3} test3/alltests.py
127 rm -rf $RPM_BUILD_ROOT
132 for f in $RPM_BUILD_ROOT%{_bindir}/*.py ; do
133 %{__mv} "${f}" "${f%.py}"
142 for f in $RPM_BUILD_ROOT%{_bindir}/*.py ; do
143 %{__mv} "${f}" "${f%.py}-3"
148 rm -rf $RPM_BUILD_ROOT
152 %defattr(644,root,root,755)
153 %attr(755,root,root) %{_bindir}/rst2html
154 %attr(755,root,root) %{_bindir}/rst2html4
155 %attr(755,root,root) %{_bindir}/rst2html5
156 %attr(755,root,root) %{_bindir}/rst2latex
157 %attr(755,root,root) %{_bindir}/rst2man
158 %attr(755,root,root) %{_bindir}/rst2odt
159 %attr(755,root,root) %{_bindir}/rst2odt_prepstyles
160 %attr(755,root,root) %{_bindir}/rst2pseudoxml
161 %attr(755,root,root) %{_bindir}/rst2s5
162 %attr(755,root,root) %{_bindir}/rst2xetex
163 %attr(755,root,root) %{_bindir}/rst2xml
164 %attr(755,root,root) %{_bindir}/rstpep2html
166 %files -n python-%{name}
167 %defattr(644,root,root,755)
168 %doc BUGS.txt COPYING.txt README.txt RELEASE-NOTES.txt THANKS.txt docs
169 %{py_sitescriptdir}/docutils
170 %{py_sitescriptdir}/docutils-%{version}-py*.egg-info
175 %defattr(644,root,root,755)
176 %attr(755,root,root) %{_bindir}/rst*-3
178 %files -n python3-%{name}
179 %defattr(644,root,root,755)
180 %doc BUGS.txt COPYING.txt README.txt RELEASE-NOTES.txt THANKS.txt docs
181 %{py3_sitescriptdir}/docutils
182 %{py3_sitescriptdir}/docutils-%{version}-py*.egg-info