3 %bcond_without python2 # CPython 2.x version
4 %bcond_without python3 # CPython 3.x version
6 Summary: Documentation Utilities
7 Summary(pl.UTF-8): Narzędzia do tworzenia dokumentacji
11 License: Public Domain, BSD, GPL (see COPYING.txt)
12 Group: Development/Tools
13 Source0: http://downloads.sourceforge.net/docutils/%{name}-%{version}.tar.gz
14 # Source0-md5: c53768d63db3873b7d452833553469de
15 URL: http://docutils.sourceforge.net/
17 BuildRequires: python-devel >= 2.3
20 BuildRequires: python3-2to3 >= 1:3.6
21 BuildRequires: python3-2to3 < 1:3.7
22 BuildRequires: python3-devel >= 3.6
24 BuildRequires: rpm-pythonprov
25 BuildRequires: rpmbuild(macros) >= 1.714
26 Requires: python-%{name} = %{version}-%{release}
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 Utilities for general- and special-purpose documentation, including
32 autodocumentation of Python modules. Includes reStructuredText, the
33 easy to read, easy to use, what-you-see-is-what-you-get plaintext
36 %description -l pl.UTF-8
37 Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
38 autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
39 do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
41 %package -n python-%{name}
42 Summary: Text documents processing modules for Python 2.x
43 Summary(pl.UTF-8): Moduły Pythona 2.x do przetwarzania dokumentów tekstowych
44 Group: Development/Languages/Python
45 %pyrequires_eq python-libs
47 %description -n python-%{name}
48 Docutils are utilities for general- and special-purpose documentation,
49 including autodocumentation of Python modules. Includes
50 reStructuredText, the easy to read, easy to use,
51 what-you-see-is-what-you-get plaintext markup language.
53 This package provides the Docutils modules for Python 2.
55 %description -n python-%{name} -l pl.UTF-8
56 Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
57 autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
58 do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
60 Ten pakiet dostarcza moduły Docutils dla Pythona 2.
63 Summary: Documentation Utilities for Python 3.x
64 Summary(pl.UTF-8): Narzędzia do tworzenia dokumentacji dla Pythona 3.x
65 Group: Development/Tools
66 Requires: python3-%{name} = %{version}-%{release}
69 Utilities for general- and special-purpose documentation, including
70 autodocumentation of Python modules. Includes reStructuredText, the
71 easy to read, easy to use, what-you-see-is-what-you-get plaintext
74 This package provides the Docutils for Python 3.
76 %description 3 -l pl.UTF-8
77 Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
78 autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
79 do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
81 Ten pakiet zawiera Docutils dla Pythona 3.
83 %package -n python3-%{name}
84 Summary: Text documents processing modules for Python 3.x
85 Summary(pl.UTF-8): Moduły Pythona 3.x do przetwarzania dokumentów tekstowych
86 Group: Development/Languages/Python
88 %description -n python3-%{name}
89 Docutils are utilities for general- and special-purpose documentation,
90 including autodocumentation of Python modules. Includes
91 reStructuredText, the easy to read, easy to use,
92 what-you-see-is-what-you-get plaintext markup language.
94 This package provides the Docutils modules for Python 3.
96 %description -n python3-%{name} -l pl.UTF-8
97 Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
98 autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
99 do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
101 Ten pakiet dostarcza moduły Docutils dla Pythona 3.
108 %{__python} setup.py config build -b build-2
112 %{__python3} setup.py config build -b build-3
116 rm -rf $RPM_BUILD_ROOT
121 for f in $RPM_BUILD_ROOT%{_bindir}/*.py ; do
122 %{__mv} "${f}" "${f%.py}"
131 for f in $RPM_BUILD_ROOT%{_bindir}/*.py ; do
132 %{__mv} "${f}" "${f%.py}-3"
137 rm -rf $RPM_BUILD_ROOT
141 %defattr(644,root,root,755)
142 %doc PKG-INFO *.txt docs
143 %attr(755,root,root) %{_bindir}/rst2html
144 %attr(755,root,root) %{_bindir}/rst2html4
145 %attr(755,root,root) %{_bindir}/rst2html5
146 %attr(755,root,root) %{_bindir}/rst2latex
147 %attr(755,root,root) %{_bindir}/rst2man
148 %attr(755,root,root) %{_bindir}/rst2odt
149 %attr(755,root,root) %{_bindir}/rst2odt_prepstyles
150 %attr(755,root,root) %{_bindir}/rst2pseudoxml
151 %attr(755,root,root) %{_bindir}/rst2s5
152 %attr(755,root,root) %{_bindir}/rst2xetex
153 %attr(755,root,root) %{_bindir}/rst2xml
154 %attr(755,root,root) %{_bindir}/rstpep2html
156 %files -n python-%{name}
157 %defattr(644,root,root,755)
158 %{py_sitescriptdir}/docutils
159 %{py_sitescriptdir}/docutils-%{version}-py*.egg-info
164 %defattr(644,root,root,755)
165 %doc PKG-INFO *.txt docs
166 %attr(755,root,root) %{_bindir}/rst*-3
168 %files -n python3-%{name}
169 %defattr(644,root,root,755)
170 %{py3_sitescriptdir}/docutils
171 %{py3_sitescriptdir}/docutils-%{version}-py*.egg-info