]> git.pld-linux.org Git - packages/docutils.git/blame - docutils.spec
- added unit tests
[packages/docutils.git] / docutils.spec
CommitLineData
8b0dd828
JB
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x version
4%bcond_without python3 # CPython 3.x version
2347be9a 5%bcond_without tests # unit tests
8b0dd828 6
01dcc6d1 7Summary: Documentation Utilities
4bad2400 8Summary(pl.UTF-8): Narzędzia do tworzenia dokumentacji
01dcc6d1 9Name: docutils
0c9cbe45 10Version: 0.14
e2b3beb1 11Release: 3
01dcc6d1 12License: Public Domain, BSD, GPL (see COPYING.txt)
13Group: Development/Tools
c3585f11 14Source0: http://downloads.sourceforge.net/docutils/%{name}-%{version}.tar.gz
0c9cbe45 15# Source0-md5: c53768d63db3873b7d452833553469de
01dcc6d1 16URL: http://docutils.sourceforge.net/
8b0dd828 17%if %{with python2}
2347be9a 18BuildRequires: python-devel >= 1:2.4
8b0dd828
JB
19%endif
20%if %{with python3}
2347be9a 21BuildRequires: python3-2to3 >= 1:3.7
e2b3beb1 22BuildRequires: python3-2to3 < 1:3.8
2347be9a 23BuildRequires: python3-devel >= 1:3.7
8b0dd828 24%endif
333ac545 25BuildRequires: rpm-pythonprov
8b0dd828 26BuildRequires: rpmbuild(macros) >= 1.714
333ac545 27Requires: python-%{name} = %{version}-%{release}
01dcc6d1 28BuildArch: noarch
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32Utilities for general- and special-purpose documentation, including
33autodocumentation of Python modules. Includes reStructuredText, the
34easy to read, easy to use, what-you-see-is-what-you-get plaintext
35markup language.
36
ff063cd2 37%description -l pl.UTF-8
c3585f11
JB
38Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
39autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
40do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
01dcc6d1 41
333ac545 42%package -n python-%{name}
c3585f11
JB
43Summary: Text documents processing modules for Python 2.x
44Summary(pl.UTF-8): Moduły Pythona 2.x do przetwarzania dokumentów tekstowych
333ac545
JK
45Group: Development/Languages/Python
46%pyrequires_eq python-libs
47
48%description -n python-%{name}
49Docutils are utilities for general- and special-purpose documentation,
e24f0ec9
JB
50including autodocumentation of Python modules. Includes
51reStructuredText, the easy to read, easy to use,
52what-you-see-is-what-you-get plaintext markup language.
333ac545 53
e24f0ec9 54This package provides the Docutils modules for Python 2.
333ac545 55
78c00b9c 56%description -n python-%{name} -l pl.UTF-8
c3585f11
JB
57Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
58autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
59do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
333ac545 60
e24f0ec9 61Ten pakiet dostarcza moduły Docutils dla Pythona 2.
333ac545 62
6efcbdba 63%package 3
64Summary: Documentation Utilities for Python 3.x
72a779b6 65Summary(pl.UTF-8): Narzędzia do tworzenia dokumentacji dla Pythona 3.x
6efcbdba 66Group: Development/Tools
72a779b6 67Requires: python3-%{name} = %{version}-%{release}
6efcbdba 68
69%description 3
70Utilities for general- and special-purpose documentation, including
71autodocumentation of Python modules. Includes reStructuredText, the
72easy to read, easy to use, what-you-see-is-what-you-get plaintext
73markup language.
74
75This package provides the Docutils for Python 3.
76
72a779b6
JB
77%description 3 -l pl.UTF-8
78Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
79autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
80do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
81
82Ten pakiet zawiera Docutils dla Pythona 3.
83
cdcb57cd 84%package -n python3-%{name}
c3585f11
JB
85Summary: Text documents processing modules for Python 3.x
86Summary(pl.UTF-8): Moduły Pythona 3.x do przetwarzania dokumentów tekstowych
cdcb57cd 87Group: Development/Languages/Python
cdcb57cd 88
89%description -n python3-%{name}
90Docutils are utilities for general- and special-purpose documentation,
e24f0ec9
JB
91including autodocumentation of Python modules. Includes
92reStructuredText, the easy to read, easy to use,
93what-you-see-is-what-you-get plaintext markup language.
cdcb57cd 94
e24f0ec9 95This package provides the Docutils modules for Python 3.
cdcb57cd 96
97%description -n python3-%{name} -l pl.UTF-8
c3585f11
JB
98Narzędzia do dokumentowania ogólnego i specjalnego zastosowania, w tym
99autodokumentacji modułów Pythona. Zawierają reStructuredText - łatwy
100do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
cdcb57cd 101
e24f0ec9 102Ten pakiet dostarcza moduły Docutils dla Pythona 3.
cdcb57cd 103
01dcc6d1 104%prep
105%setup -q
106
107%build
8b0dd828 108%if %{with python2}
e24f0ec9 109%{__python} setup.py config build -b build-2
2347be9a
JB
110
111%if %{with tests}
112PYTHONPATH=$(pwd)/build-2/lib \
113%{__python} test/alltests.py
114%endif
8b0dd828
JB
115%endif
116
117%if %{with python3}
e24f0ec9 118%{__python3} setup.py config build -b build-3
2347be9a
JB
119
120%if %{with tests}
121PYTHONPATH=$(pwd)/build-3/lib \
122%{__python3} test3/alltests.py
123%endif
8b0dd828 124%endif
01dcc6d1 125
126%install
127rm -rf $RPM_BUILD_ROOT
01dcc6d1 128
8b0dd828 129%if %{with python2}
36a94679 130%py_install
01dcc6d1 131
bffc3c80 132for f in $RPM_BUILD_ROOT%{_bindir}/*.py ; do
8b0dd828 133 %{__mv} "${f}" "${f%.py}"
cdcb57cd 134done
135
8b0dd828
JB
136%py_postclean
137%endif
138
139%if %{with python3}
36a94679 140%py3_install
cdcb57cd 141
142for f in $RPM_BUILD_ROOT%{_bindir}/*.py ; do
8b0dd828 143 %{__mv} "${f}" "${f%.py}-3"
bffc3c80 144done
8b0dd828 145%endif
a9b51192 146
01dcc6d1 147%clean
148rm -rf $RPM_BUILD_ROOT
149
8b0dd828 150%if %{with python2}
01dcc6d1 151%files
152%defattr(644,root,root,755)
153%doc PKG-INFO *.txt docs
e24f0ec9 154%attr(755,root,root) %{_bindir}/rst2html
0c9cbe45 155%attr(755,root,root) %{_bindir}/rst2html4
8b0dd828 156%attr(755,root,root) %{_bindir}/rst2html5
e24f0ec9
JB
157%attr(755,root,root) %{_bindir}/rst2latex
158%attr(755,root,root) %{_bindir}/rst2man
159%attr(755,root,root) %{_bindir}/rst2odt
160%attr(755,root,root) %{_bindir}/rst2odt_prepstyles
161%attr(755,root,root) %{_bindir}/rst2pseudoxml
162%attr(755,root,root) %{_bindir}/rst2s5
163%attr(755,root,root) %{_bindir}/rst2xetex
164%attr(755,root,root) %{_bindir}/rst2xml
165%attr(755,root,root) %{_bindir}/rstpep2html
333ac545
JK
166
167%files -n python-%{name}
168%defattr(644,root,root,755)
e24f0ec9
JB
169%{py_sitescriptdir}/docutils
170%{py_sitescriptdir}/docutils-%{version}-py*.egg-info
8b0dd828
JB
171%endif
172
173%if %{with python3}
174%files 3
175%defattr(644,root,root,755)
176%doc PKG-INFO *.txt docs
177%attr(755,root,root) %{_bindir}/rst*-3
cdcb57cd 178
179%files -n python3-%{name}
180%defattr(644,root,root,755)
e24f0ec9
JB
181%{py3_sitescriptdir}/docutils
182%{py3_sitescriptdir}/docutils-%{version}-py*.egg-info
8b0dd828 183%endif
This page took 0.132576 seconds and 4 git commands to generate.