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