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