11
0

Accepting request 590736 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/590736
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-botocore?expand=0&rev=24
This commit is contained in:
2018-03-29 09:56:24 +00:00
committed by Git OBS Bridge
parent 820ac206cd
commit a939b17692
6 changed files with 186 additions and 67 deletions

View File

@@ -18,14 +18,15 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-botocore
Version: 1.8.26
Version: 1.9.6
Release: 0
Summary: Python interface for AWS
License: Apache-2.0
Group: Development/Languages/Python
Url: https://github.com/boto/botocore
Source: https://files.pythonhosted.org/packages/source/b/botocore/botocore-%{version}.tar.gz
Patch0: hide_py_pckgmgmt.patch
# PATCH-FIX-OPENSUSE fix_tests.patch -- fix tests with removed vendored packages
Patch0: fix_tests.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module docutils >= 0.10}
BuildRequires: %{python_module jmespath < 1.0.0}
@@ -35,18 +36,20 @@ BuildRequires: %{python_module python-dateutil >= 2.1}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# Testing requirements
%if %{with tests}
# SECTION Testing requirements
BuildRequires: %{python_module mock}
BuildRequires: %{python_module nose}
BuildRequires: python-mock
BuildRequires: %{python_module requests}
BuildRequires: %{python_module six}
BuildRequires: python-unittest2
%endif
# /SECTION
Requires: python-docutils >= 0.10
Requires: python-jmespath < 1.0.0
Requires: python-jmespath >= 0.7.1
Requires: python-python-dateutil <= 3.0.0
Requires: python-python-dateutil >= 2.1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: python-requests
Requires: python-six
BuildArch: noarch
%python_subpackages
@@ -55,7 +58,12 @@ A low-level interface to a growing number of Amazon Web Services.
%prep
%setup -q -n botocore-%{version}
%patch0 -p0
%patch0 -p1
# remove requests and six
rm -r botocore/vendored/
# fix all imports:
sed -i 's/from botocore\.vendored //' botocore/*.py tests/unit/*.py
sed -i 's/botocore\.vendored\.//' botocore/*.py tests/unit/*.py tests/unit/auth/*.py
%build
%python_build
@@ -64,14 +72,12 @@ A low-level interface to a growing number of Amazon Web Services.
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with tests}
%check
%python_expand nosetests-%{$python_bin_suffix} tests/unit
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE.txt README.rst
%doc README.rst
%license LICENSE.txt
%{python_sitelib}/botocore/
%{python_sitelib}/botocore-%{version}-py%{py_ver}.egg-info