Summary:        Amazon Web Services Library.
Name:           python3-boto
Version:        2.49.0
Release:        3%{?dist}
License:        MIT License
Group:          Development/Languages/Python
Vendor:         VMware, Inc.
Distribution:   Photon
Url:            https://pypi.python.org/pypi/boto/2.48.0

Source0:        https://files.pythonhosted.org/packages/source/b/boto/boto-%{version}.tar.gz
%define sha1    boto=300e6b7abd04a77a94f769e6cad6fb9e6e84ffbb

BuildRequires:  python3-devel
BuildRequires:  python3-libs
BuildRequires:  python3-setuptools
BuildRequires:  python3-xml

%if 0%{?with_check:1}
Patch0:         makecheck.patch
BuildRequires:  python3-requests
BuildRequires:  python3-pip
%endif

Requires:       python3
Requires:       python3-libs
Requires:       python3-requests
Requires:       python3-xml

BuildArch:      noarch

%description
Boto is a Python package that provides interfaces to Amazon Web Services. Currently, all features work with Python 2.6 and 2.7. Work is under way to support Python 3.3+ in the same codebase. Modules are being ported one at a time with the help of the open source community, so please check below for compatibility with Python 3.3+.

%prep
%autosetup -p1 -n boto-%{version}

%build
%py3_build

%install
%py3_install -- --single-version-externally-managed
for item in %{buildroot}%{_bindir}/*
  do mv ${item} "${item}-%{python3_version}" ;
done

%check
%if 0%{?with_check:1}
# nose is not maintained anymore
#pip3 install nose httpretty mock
#python3 ./tests/test.py unit
%endif

%files
%defattr(-,root,root)
%{python3_sitelib}/*
%{_bindir}/asadmin-%{python3_version}
%{_bindir}/bundle_image-%{python3_version}
%{_bindir}/cfadmin-%{python3_version}
%{_bindir}/cq-%{python3_version}
%{_bindir}/cwutil-%{python3_version}
%{_bindir}/dynamodb_dump-%{python3_version}
%{_bindir}/dynamodb_load-%{python3_version}
%{_bindir}/elbadmin-%{python3_version}
%{_bindir}/fetch_file-%{python3_version}
%{_bindir}/glacier-%{python3_version}
%{_bindir}/instance_events-%{python3_version}
%{_bindir}/kill_instance-%{python3_version}
%{_bindir}/launch_instance-%{python3_version}
%{_bindir}/list_instances-%{python3_version}
%{_bindir}/lss3-%{python3_version}
%{_bindir}/mturk-%{python3_version}
%{_bindir}/pyami_sendmail-%{python3_version}
%{_bindir}/route53-%{python3_version}
%{_bindir}/s3put-%{python3_version}
%{_bindir}/sdbadmin-%{python3_version}
%{_bindir}/taskadmin-%{python3_version}

%changelog
* Wed Feb 17 2021 Prashant S Chauhan <psinghchauha@vmware.com> 2.49.0-3
- Fix makecheck
* Mon Jun 15 2020 Tapas Kundu <tkundu@vmware.com> 2.49.0-2
- Mass removal python2
* Sun Sep 09 2018 Tapas Kundu <tkundu@vmware.com> 2.49.0-1
- Update to version 2.49.0
* Tue Sep 12 2017 Xiaolin Li <xiaolinl@vmware.com> 2.48.0-1
- Initial packaging for Photon