|
|
348ffa |
%if 0%{?rhel} && 0%{?rhel} <= 7
|
|
|
348ffa |
%bcond_with python3
|
|
|
348ffa |
# Minimum nose version is 1.3.3, while EL7 has 1.3.0
|
|
|
348ffa |
%bcond_with tests
|
|
|
348ffa |
%else
|
|
|
348ffa |
%bcond_without python3
|
|
|
348ffa |
%bcond_without tests
|
|
|
348ffa |
%endif
|
|
|
348ffa |
|
|
|
d7c901 |
%define __python /usr/bin/python2
|
|
|
d7c901 |
|
|
|
348ffa |
%global pypi_name s3transfer
|
|
|
348ffa |
|
|
|
348ffa |
%global bundled_lib_dir bundled
|
|
|
348ffa |
# python-futures
|
|
|
348ffa |
%global futures_version 3.0.3
|
|
|
348ffa |
%global futures_dir %{bundled_lib_dir}/futures
|
|
|
348ffa |
# python-botocore
|
|
|
d7c901 |
%global botocore_version 1.23.46
|
|
|
348ffa |
%global botocore_dir %{bundled_lib_dir}/botocore
|
|
|
348ffa |
# python-jmespath
|
|
|
348ffa |
%global jmespath_version 0.9.0
|
|
|
348ffa |
%global jmespath_dir %{bundled_lib_dir}/jmespath
|
|
|
d7c901 |
# python-urllib3
|
|
|
d7c901 |
%global urllib3_version 1.26.8
|
|
|
d7c901 |
%global urllib3_dir %{bundled_lib_dir}/urllib3
|
|
|
348ffa |
|
|
|
348ffa |
Name: python-%{pypi_name}
|
|
|
5a97c9 |
Version: 0.1.13
|
|
|
d7c901 |
Release: 1%{?dist}.2
|
|
|
348ffa |
Summary: An Amazon S3 Transfer Manager
|
|
|
348ffa |
|
|
|
348ffa |
License: ASL 2.0
|
|
|
348ffa |
URL: https://github.com/boto/s3transfer
|
|
|
348ffa |
Source0: %{pypi_name}-%{version}.tar.gz
|
|
|
348ffa |
Source1: https://pypi.python.org/packages/source/f/futures/futures-%{futures_version}.tar.gz
|
|
|
348ffa |
Source2: https://pypi.io/packages/source/b/botocore/botocore-%{botocore_version}.tar.gz
|
|
|
348ffa |
Source3: https://pypi.python.org/packages/source/j/jmespath/jmespath-%{jmespath_version}.tar.gz
|
|
|
d7c901 |
Source4: https://github.com/urllib3/urllib3/archive/%{urllib3_version}/urllib3-%{urllib3_version}.tar.gz
|
|
|
d7c901 |
|
|
|
348ffa |
Patch0: bundled-futures-botocore-jmespath.patch
|
|
|
d7c901 |
Patch1: python2-fixes.patch
|
|
|
348ffa |
|
|
|
348ffa |
BuildArch: noarch
|
|
|
348ffa |
|
|
|
348ffa |
BuildRequires: python-devel
|
|
|
348ffa |
BuildRequires: python-setuptools
|
|
|
d7c901 |
Obsoletes: python2-%{pypi_name} <= %{version}
|
|
|
348ffa |
%if %{with tests}
|
|
|
348ffa |
BuildRequires: python-nose
|
|
|
348ffa |
BuildRequires: python-mock
|
|
|
348ffa |
BuildRequires: python-wheel
|
|
|
348ffa |
BuildRequires: python-botocore
|
|
|
348ffa |
BuildRequires: python-coverage
|
|
|
348ffa |
BuildRequires: python-unittest2
|
|
|
348ffa |
%endif # tests
|
|
|
348ffa |
# python-futures bundle
|
|
|
348ffa |
#Requires: python-futures
|
|
|
348ffa |
# python-botocore bundle
|
|
|
348ffa |
#Requires: python-botocore
|
|
|
348ffa |
|
|
|
348ffa |
# python-futures bundle
|
|
|
348ffa |
Provides: bundled(python-futures) = %{futures_version}
|
|
|
348ffa |
# python-botocore bundle
|
|
|
348ffa |
Provides: bundled(python-botocore) = %{botocore_version}
|
|
|
348ffa |
# python-jmespath bundle
|
|
|
348ffa |
#Requires: python-jmespath >= 0.7.1
|
|
|
348ffa |
Provides: bundled(python-jmespath) = %{jmespath_version}
|
|
|
348ffa |
Requires: python-dateutil >= 1.4
|
|
|
348ffa |
Requires: python-docutils >= 0.10
|
|
|
d7c901 |
# python-urllib3 bundle
|
|
|
d7c901 |
Provides: bundled(python-urllib3) = %{urllib3_version}
|
|
|
348ffa |
|
|
|
348ffa |
%description
|
|
|
348ffa |
S3transfer is a Python library for managing Amazon S3 transfers.
|
|
|
348ffa |
|
|
|
348ffa |
%if %{with python3}
|
|
|
348ffa |
%package -n python3-%{pypi_name}
|
|
|
348ffa |
Summary: An Amazon S3 Transfer Manager
|
|
|
348ffa |
BuildRequires: python3-devel
|
|
|
348ffa |
BuildRequires: python3-setuptools
|
|
|
348ffa |
%if %{with tests}
|
|
|
348ffa |
BuildRequires: python3-nose
|
|
|
348ffa |
BuildRequires: python3-mock
|
|
|
348ffa |
BuildRequires: python3-wheel
|
|
|
348ffa |
BuildRequires: python3-botocore
|
|
|
348ffa |
BuildRequires: python3-coverage
|
|
|
348ffa |
BuildRequires: python3-unittest2
|
|
|
348ffa |
%endif # tests
|
|
|
348ffa |
Requires: python3-botocore
|
|
|
348ffa |
%{?python_provide:%python_provide python3-%{pypi_name}}
|
|
|
348ffa |
|
|
|
348ffa |
%description -n python3-%{pypi_name}
|
|
|
348ffa |
S3transfer is a Python library for managing Amazon S3 transfers.
|
|
|
348ffa |
%endif # python3
|
|
|
348ffa |
|
|
|
348ffa |
%prep
|
|
|
348ffa |
%setup -q -n %{pypi_name}-%{version}
|
|
|
348ffa |
# Remove online tests (see https://github.com/boto/s3transfer/issues/8)
|
|
|
348ffa |
rm -rf tests/integration
|
|
|
348ffa |
|
|
|
348ffa |
# bundles
|
|
|
348ffa |
mkdir -p %{bundled_lib_dir}
|
|
|
348ffa |
|
|
|
348ffa |
# python-futures bundle
|
|
|
348ffa |
tar -xzf %SOURCE1 -C %{bundled_lib_dir}
|
|
|
348ffa |
mv %{bundled_lib_dir}/futures-%{futures_version} %{futures_dir}
|
|
|
348ffa |
cp %{futures_dir}/LICENSE futures_LICENSE
|
|
|
348ffa |
|
|
|
348ffa |
# python-botocore bundle
|
|
|
348ffa |
tar -xzf %SOURCE2 -C %{bundled_lib_dir}
|
|
|
348ffa |
mv %{bundled_lib_dir}/botocore-%{botocore_version} %{botocore_dir}
|
|
|
348ffa |
cp %{botocore_dir}/LICENSE.txt botocore_LICENSE.txt
|
|
|
348ffa |
cp %{botocore_dir}/README.rst botocore_README.rst
|
|
|
348ffa |
|
|
|
348ffa |
# python-jmespath bundle
|
|
|
348ffa |
tar -xzf %SOURCE3 -C %{bundled_lib_dir}
|
|
|
348ffa |
mv %{bundled_lib_dir}/jmespath-%{jmespath_version} %{jmespath_dir}
|
|
|
d7c901 |
cp %{jmespath_dir}/LICENSE.txt jmespath_LICENSE.txt
|
|
|
d7c901 |
cp %{jmespath_dir}/README.rst jmespath_README.rst
|
|
|
d7c901 |
|
|
|
d7c901 |
# python-urllib3 bundle
|
|
|
d7c901 |
tar -xzf %SOURCE4 -C %{bundled_lib_dir}
|
|
|
d7c901 |
mv %{bundled_lib_dir}/urllib3-%{urllib3_version} %{urllib3_dir}
|
|
|
d7c901 |
cp %{urllib3_dir}/LICENSE.txt urllib3_LICENSE.txt
|
|
|
d7c901 |
cp %{urllib3_dir}/README.rst urllib3_README.rst
|
|
|
348ffa |
|
|
|
348ffa |
# append bundled-directory to search path
|
|
|
348ffa |
%patch0 -p1
|
|
|
d7c901 |
%patch1 -p1
|
|
|
348ffa |
|
|
|
348ffa |
pushd %{botocore_dir}
|
|
|
348ffa |
rm -rf botocore.egg-info
|
|
|
348ffa |
# Remove online tests
|
|
|
348ffa |
rm -rf tests/integration
|
|
|
348ffa |
popd
|
|
|
348ffa |
|
|
|
348ffa |
pushd %{jmespath_dir}
|
|
|
348ffa |
rm -rf jmespath.egg-info
|
|
|
348ffa |
popd
|
|
|
348ffa |
|
|
|
348ffa |
%build
|
|
|
348ffa |
%py2_build
|
|
|
348ffa |
%if %{with python3}
|
|
|
348ffa |
%py3_build
|
|
|
348ffa |
%endif # python3
|
|
|
348ffa |
|
|
|
348ffa |
# python-futures bundle
|
|
|
348ffa |
pushd %{futures_dir}
|
|
|
348ffa |
%{__python2} setup.py build
|
|
|
348ffa |
popd
|
|
|
348ffa |
|
|
|
348ffa |
# python-botocore bundle
|
|
|
348ffa |
pushd %{botocore_dir}
|
|
|
348ffa |
%{__python2} setup.py build
|
|
|
348ffa |
popd
|
|
|
348ffa |
|
|
|
348ffa |
# python-jmespath bundle
|
|
|
348ffa |
pushd %{jmespath_dir}
|
|
|
d7c901 |
CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"
|
|
|
d7c901 |
popd
|
|
|
d7c901 |
|
|
|
d7c901 |
# python-urllib3 bundle
|
|
|
d7c901 |
pushd %{urllib3_dir}
|
|
|
d7c901 |
CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"
|
|
|
348ffa |
popd
|
|
|
348ffa |
|
|
|
348ffa |
%install
|
|
|
348ffa |
%py2_install
|
|
|
348ffa |
%if %{with python3}
|
|
|
348ffa |
%py3_install
|
|
|
348ffa |
%endif # python3
|
|
|
348ffa |
|
|
|
348ffa |
# python-futures bundle
|
|
|
348ffa |
pushd %{futures_dir}
|
|
|
d7c901 |
%{__python2} setup.py install -O1 --skip-build --root %{buildroot} --install-lib %{_usr}/lib/fence-agents/bundled
|
|
|
348ffa |
popd
|
|
|
348ffa |
|
|
|
348ffa |
# python-botocore bundle
|
|
|
348ffa |
pushd %{botocore_dir}
|
|
|
d7c901 |
%{__python2} setup.py install -O1 --skip-build --root %{buildroot} --install-lib %{_usr}/lib/fence-agents/bundled
|
|
|
348ffa |
popd
|
|
|
348ffa |
|
|
|
348ffa |
# python-jmespath bundle
|
|
|
348ffa |
pushd %{jmespath_dir}
|
|
|
d7c901 |
CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot} --install-lib %{_usr}/lib/fence-agents/bundled
|
|
|
348ffa |
mv %{buildroot}/%{_bindir}/jp.py %{buildroot}/%{_bindir}/jp.py-%{python2_version}
|
|
|
348ffa |
ln -sf %{_bindir}/jp.py-%{python2_version} %{buildroot}/%{_bindir}/jp.py-2
|
|
|
348ffa |
ln -sf %{_bindir}/jp.py-%{python2_version} %{buildroot}/%{_bindir}/jp.py
|
|
|
348ffa |
popd
|
|
|
348ffa |
|
|
|
d7c901 |
# python-urllib3 bundle
|
|
|
d7c901 |
pushd %{urllib3_dir}
|
|
|
d7c901 |
%{__python2} setup.py install -O1 --skip-build --root %{buildroot} --install-lib %{_usr}/lib/fence-agents/bundled
|
|
|
d7c901 |
popd
|
|
|
d7c901 |
|
|
|
348ffa |
%if %{with tests}
|
|
|
348ffa |
%check
|
|
|
348ffa |
nosetests-%{python2_version} --with-coverage --cover-erase --cover-package s3transfer --with-xunit --cover-xml -v tests/unit/ tests/functional/
|
|
|
348ffa |
%if %{with python3}
|
|
|
348ffa |
nosetests-%{python3_version} --with-coverage --cover-erase --cover-package s3transfer --with-xunit --cover-xml -v tests/unit/ tests/functional/
|
|
|
348ffa |
%endif # python3
|
|
|
348ffa |
%endif # tests
|
|
|
348ffa |
|
|
|
348ffa |
%files -n python-%{pypi_name}
|
|
|
348ffa |
%{!?_licensedir:%global license %doc}
|
|
|
348ffa |
%doc README.rst botocore_README.rst jmespath_README.rst
|
|
|
348ffa |
%license LICENSE.txt futures_LICENSE botocore_LICENSE.txt jmespath_LICENSE.txt
|
|
|
348ffa |
%{python_sitelib}/%{pypi_name}
|
|
|
348ffa |
%{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
|
|
348ffa |
# python-futures and python-botocore bundles
|
|
|
d7c901 |
%{_usr}/lib/fence-agents/bundled
|
|
|
348ffa |
%exclude %{_bindir}/jp.py*
|
|
|
348ffa |
|
|
|
348ffa |
%if %{with python3}
|
|
|
348ffa |
%files -n python3-%{pypi_name}
|
|
|
348ffa |
%doc README.rst
|
|
|
348ffa |
%license LICENSE.txt
|
|
|
348ffa |
%{python3_sitelib}/%{pypi_name}
|
|
|
348ffa |
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
|
|
348ffa |
%endif # python3
|
|
|
348ffa |
|
|
|
348ffa |
%changelog
|
|
|
d7c901 |
* Tue Feb 22 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 0.1.13-1.2
|
|
|
d7c901 |
- Upgrade python-botocore to fix IMDSv2 support
|
|
|
d7c901 |
|
|
|
d7c901 |
Resolves: rhbz#2050751
|
|
|
d7c901 |
|
|
|
5a97c9 |
* Thu May 24 2018 Oyvind Albrigtsen <oalbrigt@redhat.com> - 0.1.13-1
|
|
|
5a97c9 |
- Fix "python2-s3transfer" from EPEL issue by adding it to Obsoletes
|
|
|
5a97c9 |
- Rebase to v0.1.13 to fix missing "max_bandwidth" issue
|
|
|
5a97c9 |
|
|
|
5a97c9 |
Resolves: rhbz#1576985
|
|
|
5a97c9 |
Resolves: rhbz#1578083
|
|
|
5a97c9 |
|
|
|
348ffa |
* Mon Feb 12 2018 Oyvind Albrigtsen <oalbrigt@redhat.com> - 0.1.10-8
|
|
|
348ffa |
- Bundle python-futures, python-botocore and python-jmespath
|
|
|
348ffa |
|
|
|
348ffa |
Resolves: rhbz#1509441
|
|
|
348ffa |
|
|
|
348ffa |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.10-3
|
|
|
348ffa |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
348ffa |
|
|
|
348ffa |
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.10-2
|
|
|
348ffa |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
348ffa |
|
|
|
348ffa |
* Wed Dec 28 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 0.1.10-1
|
|
|
348ffa |
- Update to 0.1.10
|
|
|
348ffa |
|
|
|
348ffa |
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.1.9-2
|
|
|
348ffa |
- Rebuild for Python 3.6
|
|
|
348ffa |
|
|
|
348ffa |
* Thu Oct 27 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 0.1.9-1
|
|
|
348ffa |
- Update to 0.1.9
|
|
|
348ffa |
|
|
|
348ffa |
* Mon Oct 10 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 0.1.7-1
|
|
|
348ffa |
- Uodate to 0.1.7
|
|
|
348ffa |
|
|
|
348ffa |
* Sun Oct 02 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 0.1.5-1
|
|
|
348ffa |
- Update to 0.1.5
|
|
|
348ffa |
|
|
|
348ffa |
* Wed Sep 28 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 0.1.4-1
|
|
|
348ffa |
- Update to 0.1.4
|
|
|
348ffa |
|
|
|
348ffa |
* Wed Sep 07 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 0.1.3-1
|
|
|
348ffa |
- Update to 0.1.3
|
|
|
348ffa |
|
|
|
348ffa |
* Thu Aug 04 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 0.1.1-1
|
|
|
348ffa |
- Update to 0.1.1
|
|
|
348ffa |
|
|
|
348ffa |
* Tue Aug 02 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 0.1.0-1
|
|
|
348ffa |
- Update to 0.1.0
|
|
|
348ffa |
|
|
|
348ffa |
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.1-4
|
|
|
348ffa |
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
|
|
348ffa |
|
|
|
348ffa |
* Wed Feb 24 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 0.0.1-3
|
|
|
348ffa |
- Cleanup the spec a little bit
|
|
|
348ffa |
- Remove patch
|
|
|
348ffa |
|
|
|
348ffa |
* Tue Feb 23 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 0.0.1-2
|
|
|
348ffa |
- Add patch to remove tests needing web connection
|
|
|
348ffa |
|
|
|
348ffa |
* Tue Feb 23 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 0.0.1-1
|
|
|
348ffa |
- Initial package.
|