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