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