]>
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 | |
5 | ||
01dcc6d1 | 6 | Summary: Documentation Utilities |
4bad2400 | 7 | Summary(pl.UTF-8): Narzędzia do tworzenia dokumentacji |
01dcc6d1 | 8 | Name: docutils |
0c9cbe45 | 9 | Version: 0.14 |
e2b3beb1 | 10 | Release: 3 |
01dcc6d1 | 11 | License: Public Domain, BSD, GPL (see COPYING.txt) |
12 | Group: Development/Tools | |
c3585f11 | 13 | Source0: http://downloads.sourceforge.net/docutils/%{name}-%{version}.tar.gz |
0c9cbe45 | 14 | # Source0-md5: c53768d63db3873b7d452833553469de |
01dcc6d1 | 15 | URL: http://docutils.sourceforge.net/ |
8b0dd828 | 16 | %if %{with python2} |
c3585f11 | 17 | BuildRequires: python-devel >= 2.3 |
8b0dd828 JB |
18 | %endif |
19 | %if %{with python3} | |
c4cbba6a | 20 | BuildRequires: python3-2to3 >= 1:3.6 |
e2b3beb1 AM |
21 | BuildRequires: python3-2to3 < 1:3.8 |
22 | BuildRequires: python3-devel >= 3.7 | |
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 |
8b0dd828 JB |
109 | %endif |
110 | ||
111 | %if %{with python3} | |
e24f0ec9 | 112 | %{__python3} setup.py config build -b build-3 |
8b0dd828 | 113 | %endif |
01dcc6d1 | 114 | |
115 | %install | |
116 | rm -rf $RPM_BUILD_ROOT | |
01dcc6d1 | 117 | |
8b0dd828 | 118 | %if %{with python2} |
36a94679 | 119 | %py_install |
01dcc6d1 | 120 | |
bffc3c80 | 121 | for f in $RPM_BUILD_ROOT%{_bindir}/*.py ; do |
8b0dd828 | 122 | %{__mv} "${f}" "${f%.py}" |
cdcb57cd | 123 | done |
124 | ||
8b0dd828 JB |
125 | %py_postclean |
126 | %endif | |
127 | ||
128 | %if %{with python3} | |
36a94679 | 129 | %py3_install |
cdcb57cd | 130 | |
131 | for f in $RPM_BUILD_ROOT%{_bindir}/*.py ; do | |
8b0dd828 | 132 | %{__mv} "${f}" "${f%.py}-3" |
bffc3c80 | 133 | done |
8b0dd828 | 134 | %endif |
a9b51192 | 135 | |
01dcc6d1 | 136 | %clean |
137 | rm -rf $RPM_BUILD_ROOT | |
138 | ||
8b0dd828 | 139 | %if %{with python2} |
01dcc6d1 | 140 | %files |
141 | %defattr(644,root,root,755) | |
142 | %doc PKG-INFO *.txt docs | |
e24f0ec9 | 143 | %attr(755,root,root) %{_bindir}/rst2html |
0c9cbe45 | 144 | %attr(755,root,root) %{_bindir}/rst2html4 |
8b0dd828 | 145 | %attr(755,root,root) %{_bindir}/rst2html5 |
e24f0ec9 JB |
146 | %attr(755,root,root) %{_bindir}/rst2latex |
147 | %attr(755,root,root) %{_bindir}/rst2man | |
148 | %attr(755,root,root) %{_bindir}/rst2odt | |
149 | %attr(755,root,root) %{_bindir}/rst2odt_prepstyles | |
150 | %attr(755,root,root) %{_bindir}/rst2pseudoxml | |
151 | %attr(755,root,root) %{_bindir}/rst2s5 | |
152 | %attr(755,root,root) %{_bindir}/rst2xetex | |
153 | %attr(755,root,root) %{_bindir}/rst2xml | |
154 | %attr(755,root,root) %{_bindir}/rstpep2html | |
333ac545 JK |
155 | |
156 | %files -n python-%{name} | |
157 | %defattr(644,root,root,755) | |
e24f0ec9 JB |
158 | %{py_sitescriptdir}/docutils |
159 | %{py_sitescriptdir}/docutils-%{version}-py*.egg-info | |
8b0dd828 JB |
160 | %endif |
161 | ||
162 | %if %{with python3} | |
163 | %files 3 | |
164 | %defattr(644,root,root,755) | |
165 | %doc PKG-INFO *.txt docs | |
166 | %attr(755,root,root) %{_bindir}/rst*-3 | |
cdcb57cd | 167 | |
168 | %files -n python3-%{name} | |
169 | %defattr(644,root,root,755) | |
e24f0ec9 JB |
170 | %{py3_sitescriptdir}/docutils |
171 | %{py3_sitescriptdir}/docutils-%{version}-py*.egg-info | |
8b0dd828 | 172 | %endif |