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