2018-03-23 16:14:07 +01:00
#
# spec file for package python-CacheControl
#
2019-02-28 10:12:06 +01:00
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
2018-03-23 16:14:07 +01:00
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
2018-12-04 14:18:07 +01:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2018-03-23 16:14:07 +01:00
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name : python-CacheControl
2019-02-28 10:12:06 +01:00
Version : 0.12.5
2018-03-23 16:14:07 +01:00
Release : 0
Summary : httplib2 caching for requests
License : Apache-2.0
Group : Development/Languages/Python
2018-12-04 18:10:38 +01:00
URL : https://github.com/ionrock/cachecontrol
2019-03-25 10:50:55 +01:00
Source : https://github.com/ionrock/cachecontrol/archive/v0.12.5.tar.gz#/CacheControl-%{version}.tar.gz
2019-11-01 10:32:16 +01:00
Patch0 : pytest4.patch
2018-03-23 16:14:07 +01:00
BuildRequires : %{python_module setuptools}
BuildRequires : fdupes
2018-12-04 18:10:38 +01:00
BuildRequires : python-rpm-macros
2019-03-25 10:50:55 +01:00
Requires : python-msgpack
2018-03-23 16:14:07 +01:00
Requires : python-requests
2019-03-25 10:50:55 +01:00
Recommends: python-lockfile >= 0.9
2018-03-23 16:14:07 +01:00
Suggests : python-redis >= 2.10.5
BuildArch : noarch
2018-12-04 18:10:38 +01:00
# SECTION test requirements
2019-04-05 09:16:38 +02:00
## cherrypy is python3 only from 18.x series
BuildRequires : python3-CherryPy
BuildRequires : python3-lockfile >= 0.9
BuildRequires : python3-mock
BuildRequires : python3-msgpack
2019-11-01 10:32:16 +01:00
BuildRequires : python3-pytest
2019-04-05 09:16:38 +02:00
BuildRequires : python3-redis >= 2.10.5
BuildRequires : python3-requests
2018-12-04 18:10:38 +01:00
# /SECTION
2018-03-23 16:14:07 +01:00
%python_subpackages
%description
2019-03-25 10:50:55 +01:00
CacheControl is a port of the caching algorithms in httplib2 for use with
requests session object.
2018-03-23 16:14:07 +01:00
%prep
2019-03-25 10:50:55 +01:00
%setup -q -n cachecontrol-%{version}
2019-11-01 10:32:16 +01:00
%patch0 -p1
2018-03-23 16:14:07 +01:00
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot} %{$python_sitelib}
2019-03-25 10:50:55 +01:00
%check
# These two failures are possibly bugs needing investigation
2019-04-05 09:16:38 +02:00
PYTHONPATH=%{buildroot} %{python3_sitelib} py.test-%{python3_bin_suffix} -v -k 'not test_file_cache_recognizes_consumed_file_handle and not test_etags_get_example'
2019-03-25 10:50:55 +01:00
2018-03-23 16:14:07 +01:00
%files %{python_files}
2018-12-04 18:10:38 +01:00
%license LICENSE.txt
%doc README.rst
2018-03-23 16:14:07 +01:00
%python3_only %{_bindir} /doesitcache
%{python_sitelib} /*
%changelog