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-md5: f51729f19e70a9dc4837433193a5e798
16 URL: http://docutils.sourceforge.net/
18 BuildRequires: python-devel >= 1:2.6
21 BuildRequires: python3-2to3 >= 1:3.4
22 BuildRequires: python3-devel >= 1:3.4
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
111 PYTHONPATH=$(pwd)/build-2/lib \
112 %{__python} test/alltests.py
117 %{__python3} setup.py config build -b build-3
120 PYTHONPATH=$(pwd)/build-3/lib \
121 %{__python3} test3/alltests.py
126 rm -rf $RPM_BUILD_ROOT
131 for f in $RPM_BUILD_ROOT%{_bindir}/*.py ; do
132 %{__mv} "${f}" "${f%.py}"
141 for f in $RPM_BUILD_ROOT%{_bindir}/*.py ; do
142 %{__mv} "${f}" "${f%.py}-3"
147 rm -rf $RPM_BUILD_ROOT
151 %defattr(644,root,root,755)
152 %attr(755,root,root) %{_bindir}/rst2html
153 %attr(755,root,root) %{_bindir}/rst2html4
154 %attr(755,root,root) %{_bindir}/rst2html5
155 %attr(755,root,root) %{_bindir}/rst2latex
156 %attr(755,root,root) %{_bindir}/rst2man
157 %attr(755,root,root) %{_bindir}/rst2odt
158 %attr(755,root,root) %{_bindir}/rst2odt_prepstyles
159 %attr(755,root,root) %{_bindir}/rst2pseudoxml
160 %attr(755,root,root) %{_bindir}/rst2s5
161 %attr(755,root,root) %{_bindir}/rst2xetex
162 %attr(755,root,root) %{_bindir}/rst2xml
163 %attr(755,root,root) %{_bindir}/rstpep2html
165 %files -n python-%{name}
166 %defattr(644,root,root,755)
167 %doc BUGS.txt COPYING.txt README.txt RELEASE-NOTES.txt THANKS.txt docs
168 %{py_sitescriptdir}/docutils
169 %{py_sitescriptdir}/docutils-%{version}-py*.egg-info
174 %defattr(644,root,root,755)
175 %attr(755,root,root) %{_bindir}/rst*-3
177 %files -n python3-%{name}
178 %defattr(644,root,root,755)
179 %doc BUGS.txt COPYING.txt README.txt RELEASE-NOTES.txt THANKS.txt docs
180 %{py3_sitescriptdir}/docutils
181 %{py3_sitescriptdir}/docutils-%{version}-py*.egg-info