]> git.pld-linux.org Git - packages/python-boto.git/blame - python-boto.spec
rebuild with tests and docs
[packages/python-boto.git] / python-boto.spec
CommitLineData
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 9Summary: An integrated interface to infrastructural services offered by Amazon Web Services
3fa0ce09 10Summary(pl.UTF-8): Zintegrowany interfejs do usług infrastruktury oferowanych przez usługi WWW Amazon
ed604139 11Name: python-%{module}
32c79837 12Version: 2.49.0
89de1a55 13Release: 5
475bc349
PZ
14License: MIT
15Group: Libraries/Python
32c79837
JB
16#Source0Download: https://pypi.org/simple/boto/
17Source0: https://files.pythonhosted.org/packages/source/b/boto/boto-%{version}.tar.gz
18# Source0-md5: e9b79f80198da059d9a8055a5352fd6d
19Patch0: %{name}-mock.patch
20Patch1: %{name}-py3.patch
3e3c23b9 21URL: https://github.com/boto/boto
32c79837
JB
22%if %{with python2}
23BuildRequires: python-modules >= 1:2.6
24BuildRequires: python-setuptools
25%if %{with tests}
a7a2461d 26BuildRequires: python-httpretty
32c79837
JB
27BuildRequires: python-mock
28BuildRequires: python-nose
29%endif
30%endif
31%if %{with python3}
32BuildRequires: python3-modules >= 1:3.3
33BuildRequires: python3-setuptools
34%if %{with tests}
a7a2461d 35BuildRequires: python3-httpretty
32c79837
JB
36BuildRequires: python3-nose
37%endif
38%endif
475bc349 39BuildRequires: rpm-pythonprov
32c79837
JB
40BuildRequires: rpmbuild(macros) >= 1.714
41%if %{with doc}
42BuildRequires: sphinx-pdg-2
43%endif
44Requires: python-modules >= 1:2.6
475bc349
PZ
45BuildArch: noarch
46BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48%description
3fa0ce09
JB
49An integrated interface to current and future infrastructural services
50offered by Amazon Web Services.
51
52%description -l pl.UTF-8
53Zintegrowany interfejs do aktualnych i przyszłych usług infrastruktury
54oferowanych przez usługi WWW Amazon.
475bc349 55
ed604139
JK
56%package -n python3-%{module}
57Summary: An integrated interface to infrastructural services offered by Amazon Web Services
58Summary(pl.UTF-8): Zintegrowany interfejs do usług infrastruktury oferowanych przez usługi WWW Amazon
59Group: Libraries/Python
32c79837 60Requires: python3-modules >= 1:3.3
ed604139
JK
61
62%description -n python3-%{module}
63An integrated interface to current and future infrastructural services
64offered by Amazon Web Services.
65
66%description -n python3-%{module} -l pl.UTF-8
67Zintegrowany interfejs do aktualnych i przyszłych usług infrastruktury
68oferowanych przez usługi WWW Amazon.
69
58599a02
JK
70%package -n boto
71Summary: Python utilities for Amazon Web Services
32c79837
JB
72Summary(pl.UTF-8): Pythonowe narzędzia do usług AWS
73Group: Applications/Networking
74%if %{with python3}
75Requires: python3-%{module} = %{version}-%{release}
76%else
58599a02 77Requires: %{name} = %{version}-%{release}
32c79837 78%endif
58599a02
JK
79
80%description -n boto
6dcf472c 81Boto is an integrated Python interface to current and future
ed604139 82infrastructural services offered by Amazon Web Services.
58599a02
JK
83
84This package includes sample utilities implemented with this API.
85
32c79837
JB
86%description -n boto -l pl.UTF-8
87Boto to zintegrowany interfejs do aktualnych i przyszłych usług
88infrastruktury oferowanych przez usługi AWS (Amazon WWW Services).
89
90Ten pakiet zawiera przykładowe narzędzia zaimplementowane przy użyciu
91API boto.
92
93%package apidocs
94Summary: API documentation for Python boto module
95Summary(pl.UTF-8): Dokumentacja API modułu Pythona boto
96Group: Documentation
97
98%description apidocs
99API documentation for Python boto module.
100
101%description apidocs -l pl.UTF-8
102Dokumentacja API modułu Pythona boto.
103
475bc349 104%prep
ed604139 105%setup -q -n %{module}-%{version}
32c79837
JB
106%patch0 -p1
107%patch1 -p1
475bc349
PZ
108
109%build
ed604139 110%if %{with python3}
32c79837
JB
111%py3_build
112
113%if %{with tests}
114nosetests-%{py_ver} tests/unit -a '!notdefault'
115%endif
ed604139 116%endif
475bc349 117
4ed30b04 118%if %{with python2}
32c79837
JB
119%py_build
120
121%if %{with tests}
122nosetests-%{py3_ver} tests/unit -a '!notdefault'
123%endif
124%endif
125
126%if %{with doc}
127# docs are not ready for python3
128PYTHONPATH=$(pwd) \
129%{__make} -C docs html \
130 SPHINXBUILD=sphinx-build-2
4ed30b04
JR
131%endif
132
475bc349
PZ
133%install
134rm -rf $RPM_BUILD_ROOT
475bc349 135
ed604139 136%if %{with python2}
364e2922 137%py_install
ed604139 138
32c79837
JB
139for 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
146done
147
475bc349 148%py_postclean
ed604139
JK
149%endif
150
32c79837
JB
151%if %{with python3}
152%py3_install
153
154for 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}
159done
160%endif
161
475bc349
PZ
162%clean
163rm -rf $RPM_BUILD_ROOT
164
32c79837 165%if %{with python2}
475bc349
PZ
166%files
167%defattr(644,root,root,755)
32c79837
JB
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
3fa0ce09 190%{py_sitescriptdir}/boto
32c79837
JB
191%{py_sitescriptdir}/boto-%{version}-py*.egg-info
192%endif
58599a02 193
32c79837 194%if %{with python3}
ed604139
JK
195%files -n python3-%{module}
196%defattr(644,root,root,755)
32c79837
JB
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
ed604139 219%{py3_sitescriptdir}/boto
32c79837
JB
220%{py3_sitescriptdir}/boto-%{version}-py*.egg-info
221%endif
ed604139 222
58599a02
JK
223%files -n boto
224%defattr(644,root,root,755)
32c79837
JB
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.144576 seconds and 4 git commands to generate.