]>
Commit | Line | Data |
---|---|---|
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 | 7 | Summary: Documentation Utilities |
4bad2400 | 8 | Summary(pl.UTF-8): Narzędzia do tworzenia dokumentacji |
01dcc6d1 | 9 | Name: docutils |
0c9cbe45 | 10 | Version: 0.14 |
e2b3beb1 | 11 | Release: 3 |
01dcc6d1 | 12 | License: Public Domain, BSD, GPL (see COPYING.txt) |
13 | Group: Development/Tools | |
c3585f11 | 14 | Source0: http://downloads.sourceforge.net/docutils/%{name}-%{version}.tar.gz |
0c9cbe45 | 15 | # Source0-md5: c53768d63db3873b7d452833553469de |
01dcc6d1 | 16 | URL: http://docutils.sourceforge.net/ |
8b0dd828 | 17 | %if %{with python2} |
2347be9a | 18 | BuildRequires: python-devel >= 1:2.4 |
8b0dd828 JB |
19 | %endif |
20 | %if %{with python3} | |
2347be9a | 21 | BuildRequires: python3-2to3 >= 1:3.7 |
e2b3beb1 | 22 | BuildRequires: python3-2to3 < 1:3.8 |
2347be9a | 23 | BuildRequires: python3-devel >= 1:3.7 |
8b0dd828 | 24 | %endif |
333ac545 | 25 | BuildRequires: rpm-pythonprov |
8b0dd828 | 26 | BuildRequires: rpmbuild(macros) >= 1.714 |
333ac545 | 27 | Requires: python-%{name} = %{version}-%{release} |
01dcc6d1 | 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 | ||
ff063cd2 | 37 | %description -l pl.UTF-8 |
c3585f11 JB |
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. | |
01dcc6d1 | 41 | |
333ac545 | 42 | %package -n python-%{name} |
c3585f11 JB |
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 | |
333ac545 JK |
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, | |
e24f0ec9 JB |
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. | |
333ac545 | 53 | |
e24f0ec9 | 54 | This package provides the Docutils modules for Python 2. |
333ac545 | 55 | |
78c00b9c | 56 | %description -n python-%{name} -l pl.UTF-8 |
c3585f11 JB |
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. | |
333ac545 | 60 | |
e24f0ec9 | 61 | Ten pakiet dostarcza moduły Docutils dla Pythona 2. |
333ac545 | 62 | |
6efcbdba | 63 | %package 3 |
64 | Summary: Documentation Utilities for Python 3.x | |
72a779b6 | 65 | Summary(pl.UTF-8): Narzędzia do tworzenia dokumentacji dla Pythona 3.x |
6efcbdba | 66 | Group: Development/Tools |
72a779b6 | 67 | Requires: python3-%{name} = %{version}-%{release} |
6efcbdba | 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 | ||
72a779b6 JB |
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 | ||
cdcb57cd | 84 | %package -n python3-%{name} |
c3585f11 JB |
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 | |
cdcb57cd | 87 | Group: Development/Languages/Python |
cdcb57cd | 88 | |
89 | %description -n python3-%{name} | |
90 | Docutils are utilities for general- and special-purpose documentation, | |
e24f0ec9 JB |
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. | |
cdcb57cd | 94 | |
e24f0ec9 | 95 | This package provides the Docutils modules for Python 3. |
cdcb57cd | 96 | |
97 | %description -n python3-%{name} -l pl.UTF-8 | |
c3585f11 JB |
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. | |
cdcb57cd | 101 | |
e24f0ec9 | 102 | Ten 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} | |
112 | PYTHONPATH=$(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} | |
121 | PYTHONPATH=$(pwd)/build-3/lib \ | |
122 | %{__python3} test3/alltests.py | |
123 | %endif | |
8b0dd828 | 124 | %endif |
01dcc6d1 | 125 | |
126 | %install | |
127 | rm -rf $RPM_BUILD_ROOT | |
01dcc6d1 | 128 | |
8b0dd828 | 129 | %if %{with python2} |
36a94679 | 130 | %py_install |
01dcc6d1 | 131 | |
bffc3c80 | 132 | for f in $RPM_BUILD_ROOT%{_bindir}/*.py ; do |
8b0dd828 | 133 | %{__mv} "${f}" "${f%.py}" |
cdcb57cd | 134 | done |
135 | ||
8b0dd828 JB |
136 | %py_postclean |
137 | %endif | |
138 | ||
139 | %if %{with python3} | |
36a94679 | 140 | %py3_install |
cdcb57cd | 141 | |
142 | for f in $RPM_BUILD_ROOT%{_bindir}/*.py ; do | |
8b0dd828 | 143 | %{__mv} "${f}" "${f%.py}-3" |
bffc3c80 | 144 | done |
8b0dd828 | 145 | %endif |
a9b51192 | 146 | |
01dcc6d1 | 147 | %clean |
148 | rm -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 |