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