2018-03-23 16:14:07 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-CacheControl
|
|
|
|
#
|
2020-05-28 09:35:26 +02:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
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
|
2020-01-02 14:46:19 +01:00
|
|
|
Version: 0.12.6
|
2018-03-23 16:14:07 +01:00
|
|
|
Release: 0
|
2020-01-02 14:46:19 +01:00
|
|
|
Summary: Caching library for Python requests
|
2018-03-23 16:14:07 +01:00
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Languages/Python
|
2018-12-04 18:10:38 +01:00
|
|
|
URL: https://github.com/ionrock/cachecontrol
|
2020-01-02 14:46:19 +01:00
|
|
|
Source: https://github.com/ionrock/cachecontrol/archive/v%{version}.tar.gz#/CacheControl-%{version}.tar.gz
|
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
|
2020-05-28 09:35:26 +02:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
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}
|
2018-03-23 16:14:07 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
2020-05-28 09:35:26 +02:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/doesitcache
|
2018-03-23 16:14:07 +01:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
2019-03-25 10:50:55 +01:00
|
|
|
%check
|
2020-01-02 14:46:19 +01:00
|
|
|
# test_file_cache_recognizes_consumed_file_handle uses httpbin.org directly
|
|
|
|
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_bin_suffix} -v -k 'not test_file_cache_recognizes_consumed_file_handle'
|
2019-03-25 10:50:55 +01:00
|
|
|
|
2020-05-28 09:35:26 +02:00
|
|
|
%post
|
|
|
|
%python_install_alternative doesitcache
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative doesitcache
|
|
|
|
|
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
|
2020-05-28 09:35:26 +02:00
|
|
|
%python_alternative %{_bindir}/doesitcache
|
2018-03-23 16:14:07 +01:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|