85055b
%if 0%{?rhel} && 0%{?rhel} <= 8
85055b
%bcond_with python3
85055b
%else
85055b
%bcond_without python3
85055b
%endif
85055b
85055b
%global _with_tests 0
85055b
85055b
85055b
%global pypi_name boto3
85055b
85055b
Name:           python-%{pypi_name}
85055b
Version:        1.4.6
85055b
Release:        5%{?dist}
85055b
Summary:        The AWS SDK for Python
85055b
85055b
License:        ASL 2.0
85055b
URL:            https://github.com/boto/boto3
85055b
Source0:        %{pypi_name}-%{version}.tar.gz
85055b
Patch0:         bundled-botocore-jmespath.patch
85055b
# python-botocore bundled in python-s3transfer
85055b
#Requires:       python-botocore >= 1.5.0
85055b
# python-jmespath bundled in python-s3transfer
85055b
#Requires:       python2-jmespath >= 0.7.1
85055b
Requires:       python-s3transfer >= 0.1.10
85055b
BuildRequires:  python-devel
85055b
BuildRequires:  python-setuptools
85055b
# python-botocore bundled in python-s3transfer
85055b
#BuildRequires:  python-botocore
85055b
#BuildRequires:  python-s3transfer
85055b
85055b
# Needed for tests
85055b
%if 0%{?_with_tests}
85055b
BuildRequires:  python-nose
85055b
BuildRequires:  python-mock
85055b
BuildRequires:  python-wheel
85055b
%endif
85055b
BuildArch:      noarch
85055b
85055b
%description
85055b
Boto3 is the Amazon Web Services (AWS) Software Development
85055b
Kit (SDK) for Python, which allows Python developers to
85055b
write software that makes use of services like Amazon S3 
85055b
and Amazon EC2.
85055b
85055b
%if %{with python3}
85055b
%package -n     python3-%{pypi_name}
85055b
Summary:        The AWS SDK for Python
85055b
85055b
BuildRequires:  python3-devel
85055b
BuildRequires:  python3-setuptools
85055b
BuildRequires:  python3-nose
85055b
BuildRequires:  python3-mock
85055b
BuildRequires:  python3-wheel
85055b
BuildRequires:  python3-botocore
85055b
BuildRequires:  python3-jmespath
85055b
BuildRequires:  python3-s3transfer
85055b
Requires:       python3-botocore >= 1.5.0
85055b
Requires:       python3-jmespath >= 0.7.1
85055b
Requires:       python3-s3transfer >= 0.1.10
85055b
%{?python_provide:%python_provide python3-%{pypi_name}}
85055b
85055b
%description -n python3-%{pypi_name}
85055b
Boto3 is the Amazon Web Services (AWS) Software Development
85055b
Kit (SDK) for Python, which allows Python developers to
85055b
write software that makes use of services like Amazon S3 
85055b
and Amazon EC2.
85055b
%endif # with python3
85055b
85055b
%prep
85055b
%setup -q -n %{pypi_name}-%{version}
85055b
rm -rf %{pypi_name}.egg-info
85055b
# Remove online tests
85055b
rm -rf tests/integration
85055b
85055b
# python-botocore and python-jmespath bundled in python-s3transfer
85055b
%patch0 -p1
85055b
85055b
85055b
%build
85055b
%py2_build
85055b
%if %{with python3}
85055b
%py3_build
85055b
%endif # with python3
85055b
85055b
%install
85055b
%if %{with python3}
85055b
%py3_install
85055b
%endif # with python3
85055b
%py2_install
85055b
85055b
%check
85055b
%if 0%{?_with_tests}
85055b
%{__python2} setup.py test
85055b
%if %{with python3}
85055b
%{__python3} setup.py test
85055b
%endif # with python3
85055b
%endif
85055b
85055b
%files -n python-%{pypi_name} 
85055b
%{!?_licensedir:%global license %doc}
85055b
%doc README.rst
85055b
%license LICENSE
85055b
%{python2_sitelib}/%{pypi_name}
85055b
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
85055b
85055b
%if %{with python3}
85055b
%files -n python3-%{pypi_name} 
85055b
%doc README.rst
85055b
%license LICENSE
85055b
%{python3_sitelib}/%{pypi_name}
85055b
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
85055b
%endif # with python3
85055b
85055b
%changelog
85055b
* Tue May 22 2018 Oyvind Albrigtsen <oalbrigt@redhat.com> - 1.4.6-5
85055b
- Fix missing "import sys" in s3/transfer.py
85055b
85055b
  Resolves: rhbz#1576981
85055b
85055b
* Mon Feb 12 2018 Oyvind Albrigtsen <oalbrigt@redhat.com> - 1.4.6-4
85055b
- Append python-botocore and python-jmespath bundled directories to
85055b
  search path where needed
85055b
85055b
  Resolves: rhbz#1509439
85055b
85055b
* Sun Aug 13 2017 Fabio Alessandro Locati <fale@fedoraproject.org> 1.4.6-2
85055b
- Update to 1.4.6
85055b
85055b
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.4-3
85055b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
85055b
85055b
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.4-2
85055b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
85055b
85055b
* Fri Jan 20 2017 Fabio Alessandro Locati <fale@fedoraproject.org> 1.4.4-1
85055b
- Update to 1.4.4
85055b
85055b
* Wed Dec 28 2016 Fabio Alessandro Locati <fale@fedoraproject.org> 1.4.3-1
85055b
- Update to 1.4.3
85055b
85055b
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 1.4.2-2
85055b
- Rebuild for Python 3.6
85055b
85055b
* Sat Dec 03 2016 Fabio Alessandro Locati <fale@fedoraproject.org> 1.4.2-1
85055b
- Update to 1.4.2
85055b
85055b
* Mon Oct 10 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.4.1-1
85055b
- Update to 1.4.1
85055b
85055b
* Thu Aug 04 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.4.0-1
85055b
- New upstream release
85055b
85055b
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-2
85055b
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
85055b
85055b
* Sat May 28 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.3.1-1
85055b
- New upstream release
85055b
85055b
* Tue Mar 29 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.3.0-1
85055b
- New upstream release
85055b
85055b
* Fri Feb 19 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.2.4-1
85055b
- New upstream release
85055b
85055b
* Thu Feb 11 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.2.3-3
85055b
- Fix python2- subpackage to require python-future
85055b
85055b
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.3-2
85055b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
85055b
85055b
* Tue Dec 29 2015 Fabio Alessandro Locati <fale@fedoraproject.org> - 1.2.3-1
85055b
- Initial package.