e5cc0e
%if 0%{?rhel} && 0%{?rhel} <= 7
e5cc0e
%bcond_with python3
e5cc0e
%else
e5cc0e
%bcond_without python3
e5cc0e
%endif
e5cc0e
e5cc0e
%if 0%{?rhel} > 7
e5cc0e
# Disable python2 build by default
e5cc0e
%bcond_with python2
e5cc0e
%else
e5cc0e
%bcond_without python2
e5cc0e
%endif
e5cc0e
e5cc0e
%global pypi_name boto3
e5cc0e
e5cc0e
Name:           python-%{pypi_name}
e5cc0e
Version:        1.6.1
e5cc0e
Release:        2%{?dist}
e5cc0e
Summary:        The AWS SDK for Python
e5cc0e
e5cc0e
License:        ASL 2.0
e5cc0e
URL:            https://github.com/boto/boto3
e5cc0e
Source0:        https://pypi.io/packages/source/b/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
e5cc0e
BuildArch:      noarch
e5cc0e
e5cc0e
%description
e5cc0e
Boto3 is the Amazon Web Services (AWS) Software Development
e5cc0e
Kit (SDK) for Python, which allows Python developers to
e5cc0e
write software that makes use of services like Amazon S3 
e5cc0e
and Amazon EC2.
e5cc0e
e5cc0e
%if %{with python2}
e5cc0e
%package -n     python2-%{pypi_name}
e5cc0e
Summary:        The AWS SDK for Python
e5cc0e
e5cc0e
BuildRequires:  python2-devel
e5cc0e
BuildRequires:  python-setuptools
e5cc0e
BuildRequires:  python-nose
e5cc0e
BuildRequires:  python-mock
e5cc0e
BuildRequires:  python-wheel
e5cc0e
BuildRequires:  python2-botocore
e5cc0e
BuildRequires:  python2-jmespath
e5cc0e
BuildRequires:  python-futures
e5cc0e
BuildRequires:  python2-s3transfer
e5cc0e
Requires:       python2-botocore >= 1.5.0
e5cc0e
Requires:       python2-jmespath >= 0.7.1
e5cc0e
Requires:       python2-s3transfer >= 0.1.10
e5cc0e
RequireS:       python-futures >= 2.2.0
e5cc0e
%{?python_provide:%python_provide python2-%{pypi_name}}
e5cc0e
%{?el6:Provides: python-%{pypi_name}}
e5cc0e
e5cc0e
%description -n python2-%{pypi_name}
e5cc0e
Boto3 is the Amazon Web Services (AWS) Software Development
e5cc0e
Kit (SDK) for Python, which allows Python developers to
e5cc0e
write software that makes use of services like Amazon S3 
e5cc0e
and Amazon EC2.
e5cc0e
%endif # with python2
e5cc0e
e5cc0e
%if %{with python3}
e5cc0e
%package -n     python3-%{pypi_name}
e5cc0e
Summary:        The AWS SDK for Python
e5cc0e
e5cc0e
BuildRequires:  python3-devel
e5cc0e
BuildRequires:  python3-setuptools
e5cc0e
BuildRequires:  python3-nose
e5cc0e
BuildRequires:  python3-mock
e5cc0e
BuildRequires:  python3-wheel
e5cc0e
BuildRequires:  python3-botocore
e5cc0e
BuildRequires:  python3-jmespath
e5cc0e
BuildRequires:  python3-s3transfer
e5cc0e
Requires:       python3-botocore >= 1.5.0
e5cc0e
Requires:       python3-jmespath >= 0.7.1
e5cc0e
Requires:       python3-s3transfer >= 0.1.10
e5cc0e
%{?python_provide:%python_provide python3-%{pypi_name}}
e5cc0e
e5cc0e
%description -n python3-%{pypi_name}
e5cc0e
Boto3 is the Amazon Web Services (AWS) Software Development
e5cc0e
Kit (SDK) for Python, which allows Python developers to
e5cc0e
write software that makes use of services like Amazon S3 
e5cc0e
and Amazon EC2.
e5cc0e
%endif # with python3
e5cc0e
e5cc0e
%prep
e5cc0e
%setup -q -n %{pypi_name}-%{version}
e5cc0e
rm -rf %{pypi_name}.egg-info
e5cc0e
# Remove online tests
e5cc0e
rm -rf tests/integration
e5cc0e
e5cc0e
%build
e5cc0e
%if %{with python2}
e5cc0e
%py2_build
e5cc0e
%endif # with python2
e5cc0e
%if %{with python3}
e5cc0e
%py3_build
e5cc0e
%endif # with python3
e5cc0e
e5cc0e
%install
e5cc0e
%if %{with python3}
e5cc0e
%py3_install
e5cc0e
%endif # with python3
e5cc0e
%if %{with python2}
e5cc0e
%py2_install
e5cc0e
%endif # with python2
e5cc0e
e5cc0e
%check
e5cc0e
%if %{with python2}
e5cc0e
%{__python2} setup.py test
e5cc0e
%endif # with python2
e5cc0e
%if %{with python3}
e5cc0e
%{__python3} setup.py test
e5cc0e
%endif # with python3
e5cc0e
e5cc0e
%if %{with python2}
e5cc0e
%files -n python2-%{pypi_name} 
e5cc0e
%{!?_licensedir:%global license %doc}
e5cc0e
%doc README.rst
e5cc0e
%license LICENSE
e5cc0e
%{python2_sitelib}/%{pypi_name}
e5cc0e
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
e5cc0e
%endif # with python2
e5cc0e
e5cc0e
%if %{with python3}
e5cc0e
%files -n python3-%{pypi_name} 
e5cc0e
%doc README.rst
e5cc0e
%license LICENSE
e5cc0e
%{python3_sitelib}/%{pypi_name}
e5cc0e
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
e5cc0e
%endif # with python3
e5cc0e
e5cc0e
%changelog
e5cc0e
* Fri Jun 08 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.6.1-2
e5cc0e
- Conditionalize the python2 subpackage
e5cc0e
e5cc0e
* Wed Feb 28 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.6.1-1
e5cc0e
- Update to 1.6.1
e5cc0e
e5cc0e
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.19-2
e5cc0e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
e5cc0e
e5cc0e
* Sat Jan 20 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.5.19-1
e5cc0e
- Update to 1.5.19
e5cc0e
e5cc0e
* Sat Jan 20 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.5.18-1
e5cc0e
- Update to 1.5.18
e5cc0e
e5cc0e
* Tue Jan 16 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.5.15-1
e5cc0e
- Update to 1.5.15
e5cc0e
e5cc0e
* Wed Jan 10 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.5.12-1
e5cc0e
- Update to 1.5.12
e5cc0e
e5cc0e
* Wed Jan 03 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.5.7-1
e5cc0e
- Update to 1.5.7
e5cc0e
e5cc0e
* Sun Aug 13 2017 Fabio Alessandro Locati <fale@fedoraproject.org> 1.4.6-1
e5cc0e
- Update to 1.4.6
e5cc0e
e5cc0e
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.4-3
e5cc0e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
e5cc0e
e5cc0e
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.4-2
e5cc0e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
e5cc0e
e5cc0e
* Fri Jan 20 2017 Fabio Alessandro Locati <fale@fedoraproject.org> 1.4.4-1
e5cc0e
- Update to 1.4.4
e5cc0e
e5cc0e
* Wed Dec 28 2016 Fabio Alessandro Locati <fale@fedoraproject.org> 1.4.3-1
e5cc0e
- Update to 1.4.3
e5cc0e
e5cc0e
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 1.4.2-2
e5cc0e
- Rebuild for Python 3.6
e5cc0e
e5cc0e
* Sat Dec 03 2016 Fabio Alessandro Locati <fale@fedoraproject.org> 1.4.2-1
e5cc0e
- Update to 1.4.2
e5cc0e
e5cc0e
* Mon Oct 10 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.4.1-1
e5cc0e
- Update to 1.4.1
e5cc0e
e5cc0e
* Thu Aug 04 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.4.0-1
e5cc0e
- New upstream release
e5cc0e
e5cc0e
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-2
e5cc0e
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
e5cc0e
e5cc0e
* Sat May 28 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.3.1-1
e5cc0e
- New upstream release
e5cc0e
e5cc0e
* Tue Mar 29 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.3.0-1
e5cc0e
- New upstream release
e5cc0e
e5cc0e
* Fri Feb 19 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.2.4-1
e5cc0e
- New upstream release
e5cc0e
e5cc0e
* Thu Feb 11 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.2.3-3
e5cc0e
- Fix python2- subpackage to require python-future
e5cc0e
e5cc0e
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.3-2
e5cc0e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
e5cc0e
e5cc0e
* Tue Dec 29 2015 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.2.3-1
e5cc0e
- Initial package.