]>
Commit | Line | Data |
---|---|---|
32c79837 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # Sphinx documentation | |
4 | %bcond_without tests # unit tests | |
ed604139 JK |
5 | %bcond_without python2 # CPython 2.x module |
6 | %bcond_without python3 # CPython 3.x module | |
7 | ||
8 | %define module boto | |
475bc349 | 9 | Summary: An integrated interface to infrastructural services offered by Amazon Web Services |
3fa0ce09 | 10 | Summary(pl.UTF-8): Zintegrowany interfejs do usług infrastruktury oferowanych przez usługi WWW Amazon |
ed604139 | 11 | Name: python-%{module} |
32c79837 JB |
12 | Version: 2.49.0 |
13 | Release: 1 | |
475bc349 PZ |
14 | License: MIT |
15 | Group: Libraries/Python | |
32c79837 JB |
16 | #Source0Download: https://pypi.org/simple/boto/ |
17 | Source0: https://files.pythonhosted.org/packages/source/b/boto/boto-%{version}.tar.gz | |
18 | # Source0-md5: e9b79f80198da059d9a8055a5352fd6d | |
19 | Patch0: %{name}-mock.patch | |
20 | Patch1: %{name}-py3.patch | |
3e3c23b9 | 21 | URL: https://github.com/boto/boto |
32c79837 JB |
22 | %if %{with python2} |
23 | BuildRequires: python-modules >= 1:2.6 | |
24 | BuildRequires: python-setuptools | |
25 | %if %{with tests} | |
26 | BuildRequires: python-mock | |
27 | BuildRequires: python-nose | |
28 | %endif | |
29 | %endif | |
30 | %if %{with python3} | |
31 | BuildRequires: python3-modules >= 1:3.3 | |
32 | BuildRequires: python3-setuptools | |
33 | %if %{with tests} | |
34 | BuildRequires: python3-nose | |
35 | %endif | |
36 | %endif | |
475bc349 | 37 | BuildRequires: rpm-pythonprov |
32c79837 JB |
38 | BuildRequires: rpmbuild(macros) >= 1.714 |
39 | %if %{with doc} | |
40 | BuildRequires: sphinx-pdg-2 | |
41 | %endif | |
42 | Requires: python-modules >= 1:2.6 | |
475bc349 PZ |
43 | BuildArch: noarch |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
45 | ||
46 | %description | |
3fa0ce09 JB |
47 | An integrated interface to current and future infrastructural services |
48 | offered by Amazon Web Services. | |
49 | ||
50 | %description -l pl.UTF-8 | |
51 | Zintegrowany interfejs do aktualnych i przyszłych usług infrastruktury | |
52 | oferowanych przez usługi WWW Amazon. | |
475bc349 | 53 | |
ed604139 JK |
54 | %package -n python3-%{module} |
55 | Summary: An integrated interface to infrastructural services offered by Amazon Web Services | |
56 | Summary(pl.UTF-8): Zintegrowany interfejs do usług infrastruktury oferowanych przez usługi WWW Amazon | |
57 | Group: Libraries/Python | |
32c79837 | 58 | Requires: python3-modules >= 1:3.3 |
ed604139 JK |
59 | |
60 | %description -n python3-%{module} | |
61 | An integrated interface to current and future infrastructural services | |
62 | offered by Amazon Web Services. | |
63 | ||
64 | %description -n python3-%{module} -l pl.UTF-8 | |
65 | Zintegrowany interfejs do aktualnych i przyszłych usług infrastruktury | |
66 | oferowanych przez usługi WWW Amazon. | |
67 | ||
58599a02 JK |
68 | %package -n boto |
69 | Summary: Python utilities for Amazon Web Services | |
32c79837 JB |
70 | Summary(pl.UTF-8): Pythonowe narzędzia do usług AWS |
71 | Group: Applications/Networking | |
72 | %if %{with python3} | |
73 | Requires: python3-%{module} = %{version}-%{release} | |
74 | %else | |
58599a02 | 75 | Requires: %{name} = %{version}-%{release} |
32c79837 | 76 | %endif |
58599a02 JK |
77 | |
78 | %description -n boto | |
6dcf472c | 79 | Boto is an integrated Python interface to current and future |
ed604139 | 80 | infrastructural services offered by Amazon Web Services. |
58599a02 JK |
81 | |
82 | This package includes sample utilities implemented with this API. | |
83 | ||
32c79837 JB |
84 | %description -n boto -l pl.UTF-8 |
85 | Boto to zintegrowany interfejs do aktualnych i przyszłych usług | |
86 | infrastruktury oferowanych przez usługi AWS (Amazon WWW Services). | |
87 | ||
88 | Ten pakiet zawiera przykładowe narzędzia zaimplementowane przy użyciu | |
89 | API boto. | |
90 | ||
91 | %package apidocs | |
92 | Summary: API documentation for Python boto module | |
93 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona boto | |
94 | Group: Documentation | |
95 | ||
96 | %description apidocs | |
97 | API documentation for Python boto module. | |
98 | ||
99 | %description apidocs -l pl.UTF-8 | |
100 | Dokumentacja API modułu Pythona boto. | |
101 | ||
475bc349 | 102 | %prep |
ed604139 | 103 | %setup -q -n %{module}-%{version} |
32c79837 JB |
104 | %patch0 -p1 |
105 | %patch1 -p1 | |
475bc349 PZ |
106 | |
107 | %build | |
ed604139 | 108 | %if %{with python3} |
32c79837 JB |
109 | %py3_build |
110 | ||
111 | %if %{with tests} | |
112 | nosetests-%{py_ver} tests/unit -a '!notdefault' | |
113 | %endif | |
ed604139 | 114 | %endif |
475bc349 | 115 | |
4ed30b04 | 116 | %if %{with python2} |
32c79837 JB |
117 | %py_build |
118 | ||
119 | %if %{with tests} | |
120 | nosetests-%{py3_ver} tests/unit -a '!notdefault' | |
121 | %endif | |
122 | %endif | |
123 | ||
124 | %if %{with doc} | |
125 | # docs are not ready for python3 | |
126 | PYTHONPATH=$(pwd) \ | |
127 | %{__make} -C docs html \ | |
128 | SPHINXBUILD=sphinx-build-2 | |
4ed30b04 JR |
129 | %endif |
130 | ||
475bc349 PZ |
131 | %install |
132 | rm -rf $RPM_BUILD_ROOT | |
475bc349 | 133 | |
ed604139 | 134 | %if %{with python2} |
364e2922 | 135 | %py_install |
ed604139 | 136 | |
32c79837 JB |
137 | for bin in asadmin bundle_image cfadmin cq cwutil dynamodb_dump dynamodb_load elbadmin \ |
138 | fetch_file glacier instance_events kill_instance launch_instance list_instances \ | |
139 | lss3 mturk pyami_sendmail route53 s3put sdbadmin taskadmin ; do | |
140 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/${bin} $RPM_BUILD_ROOT%{_bindir}/${bin}-2 | |
141 | %if %{without python3} | |
142 | ln -sf ${bin}-2 $RPM_BUILD_ROOT%{_bindir}/${bin} | |
143 | %endif | |
144 | done | |
145 | ||
475bc349 | 146 | %py_postclean |
ed604139 JK |
147 | %endif |
148 | ||
32c79837 JB |
149 | %if %{with python3} |
150 | %py3_install | |
151 | ||
152 | for bin in asadmin bundle_image cfadmin cq cwutil dynamodb_dump dynamodb_load elbadmin \ | |
153 | fetch_file glacier instance_events kill_instance launch_instance list_instances \ | |
154 | lss3 mturk pyami_sendmail route53 s3put sdbadmin taskadmin ; do | |
155 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/${bin} $RPM_BUILD_ROOT%{_bindir}/${bin}-3 | |
156 | ln -sf ${bin}-3 $RPM_BUILD_ROOT%{_bindir}/${bin} | |
157 | done | |
158 | %endif | |
159 | ||
475bc349 PZ |
160 | %clean |
161 | rm -rf $RPM_BUILD_ROOT | |
162 | ||
32c79837 | 163 | %if %{with python2} |
475bc349 PZ |
164 | %files |
165 | %defattr(644,root,root,755) | |
32c79837 JB |
166 | %doc README.rst |
167 | %attr(755,root,root) %{_bindir}/asadmin-2 | |
168 | %attr(755,root,root) %{_bindir}/bundle_image-2 | |
169 | %attr(755,root,root) %{_bindir}/cfadmin-2 | |
170 | %attr(755,root,root) %{_bindir}/cq-2 | |
171 | %attr(755,root,root) %{_bindir}/cwutil-2 | |
172 | %attr(755,root,root) %{_bindir}/dynamodb_dump-2 | |
173 | %attr(755,root,root) %{_bindir}/dynamodb_load-2 | |
174 | %attr(755,root,root) %{_bindir}/elbadmin-2 | |
175 | %attr(755,root,root) %{_bindir}/fetch_file-2 | |
176 | %attr(755,root,root) %{_bindir}/glacier-2 | |
177 | %attr(755,root,root) %{_bindir}/instance_events-2 | |
178 | %attr(755,root,root) %{_bindir}/kill_instance-2 | |
179 | %attr(755,root,root) %{_bindir}/launch_instance-2 | |
180 | %attr(755,root,root) %{_bindir}/list_instances-2 | |
181 | %attr(755,root,root) %{_bindir}/lss3-2 | |
182 | %attr(755,root,root) %{_bindir}/mturk-2 | |
183 | %attr(755,root,root) %{_bindir}/pyami_sendmail-2 | |
184 | %attr(755,root,root) %{_bindir}/route53-2 | |
185 | %attr(755,root,root) %{_bindir}/s3put-2 | |
186 | %attr(755,root,root) %{_bindir}/sdbadmin-2 | |
187 | %attr(755,root,root) %{_bindir}/taskadmin-2 | |
3fa0ce09 | 188 | %{py_sitescriptdir}/boto |
32c79837 JB |
189 | %{py_sitescriptdir}/boto-%{version}-py*.egg-info |
190 | %endif | |
58599a02 | 191 | |
32c79837 | 192 | %if %{with python3} |
ed604139 JK |
193 | %files -n python3-%{module} |
194 | %defattr(644,root,root,755) | |
32c79837 JB |
195 | %doc README.rst |
196 | %attr(755,root,root) %{_bindir}/asadmin-3 | |
197 | %attr(755,root,root) %{_bindir}/bundle_image-3 | |
198 | %attr(755,root,root) %{_bindir}/cfadmin-3 | |
199 | %attr(755,root,root) %{_bindir}/cq-3 | |
200 | %attr(755,root,root) %{_bindir}/cwutil-3 | |
201 | %attr(755,root,root) %{_bindir}/dynamodb_dump-3 | |
202 | %attr(755,root,root) %{_bindir}/dynamodb_load-3 | |
203 | %attr(755,root,root) %{_bindir}/elbadmin-3 | |
204 | %attr(755,root,root) %{_bindir}/fetch_file-3 | |
205 | %attr(755,root,root) %{_bindir}/glacier-3 | |
206 | %attr(755,root,root) %{_bindir}/instance_events-3 | |
207 | %attr(755,root,root) %{_bindir}/kill_instance-3 | |
208 | %attr(755,root,root) %{_bindir}/launch_instance-3 | |
209 | %attr(755,root,root) %{_bindir}/list_instances-3 | |
210 | %attr(755,root,root) %{_bindir}/lss3-3 | |
211 | %attr(755,root,root) %{_bindir}/mturk-3 | |
212 | %attr(755,root,root) %{_bindir}/pyami_sendmail-3 | |
213 | %attr(755,root,root) %{_bindir}/route53-3 | |
214 | %attr(755,root,root) %{_bindir}/s3put-3 | |
215 | %attr(755,root,root) %{_bindir}/sdbadmin-3 | |
216 | %attr(755,root,root) %{_bindir}/taskadmin-3 | |
ed604139 | 217 | %{py3_sitescriptdir}/boto |
32c79837 JB |
218 | %{py3_sitescriptdir}/boto-%{version}-py*.egg-info |
219 | %endif | |
ed604139 | 220 | |
58599a02 JK |
221 | %files -n boto |
222 | %defattr(644,root,root,755) | |
32c79837 JB |
223 | %attr(755,root,root) %{_bindir}/asadmin |
224 | %attr(755,root,root) %{_bindir}/bundle_image | |
225 | %attr(755,root,root) %{_bindir}/cfadmin | |
226 | %attr(755,root,root) %{_bindir}/cq | |
227 | %attr(755,root,root) %{_bindir}/cwutil | |
228 | %attr(755,root,root) %{_bindir}/dynamodb_dump | |
229 | %attr(755,root,root) %{_bindir}/dynamodb_load | |
230 | %attr(755,root,root) %{_bindir}/elbadmin | |
231 | %attr(755,root,root) %{_bindir}/fetch_file | |
232 | %attr(755,root,root) %{_bindir}/glacier | |
233 | %attr(755,root,root) %{_bindir}/instance_events | |
234 | %attr(755,root,root) %{_bindir}/kill_instance | |
235 | %attr(755,root,root) %{_bindir}/launch_instance | |
236 | %attr(755,root,root) %{_bindir}/list_instances | |
237 | %attr(755,root,root) %{_bindir}/lss3 | |
238 | %attr(755,root,root) %{_bindir}/mturk | |
239 | %attr(755,root,root) %{_bindir}/pyami_sendmail | |
240 | %attr(755,root,root) %{_bindir}/route53 | |
241 | %attr(755,root,root) %{_bindir}/s3put | |
242 | %attr(755,root,root) %{_bindir}/sdbadmin | |
243 | %attr(755,root,root) %{_bindir}/taskadmin | |
244 | ||
245 | %if %{with doc} | |
246 | %files apidocs | |
247 | %defattr(644,root,root,755) | |
248 | %doc docs/build/html/{_static,migrations,ref,releasenotes,*.html,*.js} | |
249 | %endif |