Accepting request 605692 from devel:languages:python:aws

- Avoid running tests on 32bit as they fail there on oom

- Make sure to really not use any damn bundles:
  * no-bundled-packages.patch
  * Never rely on some bundled package version just use system libs
- Enable testsuite and make it pass thanks to above patch

OBS-URL: https://build.opensuse.org/request/show/605692
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-s3transfer?expand=0&rev=7
This commit is contained in:
Dominique Leuenberger 2018-05-10 13:50:35 +00:00 committed by Git OBS Bridge
parent 3611858b0d
commit b5378c5808
3 changed files with 77 additions and 11 deletions

39
no-bundled-packages.patch Normal file
View File

@ -0,0 +1,39 @@
Index: s3transfer-0.1.13/s3transfer/__init__.py
===================================================================
--- s3transfer-0.1.13.orig/s3transfer/__init__.py
+++ s3transfer-0.1.13/s3transfer/__init__.py
@@ -138,7 +138,7 @@ from botocore.compat import six
try:
from botocore.vendored.requests.packages.urllib3.exceptions import ReadTimeoutError
except ImportError:
- from requests.packages.urllib3.exceptions import ReadTimeoutError
+ from urllib3.exceptions import ReadTimeoutError
from botocore.exceptions import IncompleteReadError
Index: s3transfer-0.1.13/s3transfer/download.py
===================================================================
--- s3transfer-0.1.13.orig/s3transfer/download.py
+++ s3transfer-0.1.13/s3transfer/download.py
@@ -20,7 +20,7 @@ import heapq
from botocore.compat import six
from botocore.exceptions import IncompleteReadError
-from botocore.vendored.requests.packages.urllib3.exceptions import \
+from urllib3.exceptions import \
ReadTimeoutError
from s3transfer.compat import SOCKET_ERROR
Index: s3transfer-0.1.13/tests/unit/test_s3transfer.py
===================================================================
--- s3transfer-0.1.13.orig/tests/unit/test_s3transfer.py
+++ s3transfer-0.1.13/tests/unit/test_s3transfer.py
@@ -18,7 +18,7 @@ from tests import unittest
from contextlib import closing
import mock
-from botocore.vendored import six
+import six
from concurrent import futures
from s3transfer.exceptions import RetriesExceededError

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Wed May 9 09:05:34 UTC 2018 - tchvatal@suse.com
- Avoid running tests on 32bit as they fail there on oom
-------------------------------------------------------------------
Tue May 8 15:38:20 UTC 2018 - tchvatal@suse.com
- Make sure to really not use any damn bundles:
* no-bundled-packages.patch
* Never rely on some bundled package version just use system libs
- Enable testsuite and make it pass thanks to above patch
-------------------------------------------------------------------
Thu Apr 19 10:37:34 UTC 2018 - mimi.vx@gmail.com

View File

@ -23,23 +23,28 @@ Release: 0
Summary: Python S3 transfer manager
License: Apache-2.0
Group: Development/Languages/Python
Url: https://github.com/boto/s3transfer
URL: https://github.com/boto/s3transfer
Source0: https://files.pythonhosted.org/packages/source/s/s3transfer/s3transfer-%{version}.tar.gz
Patch0: hide_py_pckgmgmt.patch
Patch1: system-requests.patch
BuildRequires: %{python_module devel}
Patch2: no-bundled-packages.patch
BuildRequires: %{python_module botocore >= 1.4.10}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module urllib3}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-botocore <= 2.0.0
Requires: python-botocore >= 1.4.10
BuildRequires: python2-futures >= 2.2.0
Requires: python-botocore <= 2.0.0
Requires: python-botocore >= 1.4.10
Requires: python-requests
%ifpython2
Requires: python-futures <= 4.0.0
Requires: python-futures >= 2.2.0
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: python-urllib3
BuildArch: noarch
%ifpython2
Requires: python-futures <= 4.0.0
Requires: python-futures >= 2.2.0
%endif
%python_subpackages
%description
@ -49,6 +54,9 @@ A transfer manager for Amazon Web Services S3
%setup -q -n s3transfer-%{version}
%patch0
%patch1 -p1
%patch2 -p1
# remove integration tests that need running s3 :)
rm -rf tests/integration
%build
%python_build
@ -57,9 +65,15 @@ A transfer manager for Amazon Web Services S3
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# on 32bit the tests fail on OOM and various other funny things
%ifarch x86_64
%python_expand nosetests-%{$python_bin_suffix}
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE.txt README.rst
%license LICENSE.txt
%doc README.rst
%{python_sitelib}/s3transfer/
%{python_sitelib}/s3transfer-%{version}-py*.egg-info