]> git.pld-linux.org Git - packages/python-boto.git/blob - python-boto.spec
- updated to 2.49.0, added apidocs and tests
[packages/python-boto.git] / python-boto.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 %define module boto
9 Summary:        An integrated interface to infrastructural services offered by Amazon Web Services
10 Summary(pl.UTF-8):      Zintegrowany interfejs do usług infrastruktury oferowanych przez usługi WWW Amazon
11 Name:           python-%{module}
12 Version:        2.49.0
13 Release:        1
14 License:        MIT
15 Group:          Libraries/Python
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
21 URL:            https://github.com/boto/boto
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
37 BuildRequires:  rpm-pythonprov
38 BuildRequires:  rpmbuild(macros) >= 1.714
39 %if %{with doc}
40 BuildRequires:  sphinx-pdg-2
41 %endif
42 Requires:       python-modules >= 1:2.6
43 BuildArch:      noarch
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %description
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.
53
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
58 Requires:       python3-modules >= 1:3.3
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
68 %package -n boto
69 Summary:        Python utilities for Amazon Web Services
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
75 Requires:       %{name} = %{version}-%{release}
76 %endif
77
78 %description -n boto
79 Boto is an integrated Python interface to current and future
80 infrastructural services offered by Amazon Web Services.
81
82 This package includes sample utilities implemented with this API.
83
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
102 %prep
103 %setup -q -n %{module}-%{version}
104 %patch0 -p1
105 %patch1 -p1
106
107 %build
108 %if %{with python3}
109 %py3_build
110
111 %if %{with tests}
112 nosetests-%{py_ver} tests/unit -a '!notdefault'
113 %endif
114 %endif
115
116 %if %{with python2}
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
129 %endif
130
131 %install
132 rm -rf $RPM_BUILD_ROOT
133
134 %if %{with python2}
135 %py_install
136
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
146 %py_postclean
147 %endif
148
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
160 %clean
161 rm -rf $RPM_BUILD_ROOT
162
163 %if %{with python2}
164 %files
165 %defattr(644,root,root,755)
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
188 %{py_sitescriptdir}/boto
189 %{py_sitescriptdir}/boto-%{version}-py*.egg-info
190 %endif
191
192 %if %{with python3}
193 %files -n python3-%{module}
194 %defattr(644,root,root,755)
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
217 %{py3_sitescriptdir}/boto
218 %{py3_sitescriptdir}/boto-%{version}-py*.egg-info
219 %endif
220
221 %files -n boto
222 %defattr(644,root,root,755)
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
This page took 0.07064 seconds and 3 git commands to generate.