2018-03-23 16:14:07 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-CacheControl
|
|
|
|
#
|
2023-05-08 10:18:52 +02:00
|
|
|
# Copyright (c) 2023 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
|
|
|
#
|
|
|
|
|
|
|
|
|
2023-05-08 10:18:52 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2018-03-23 16:14:07 +01:00
|
|
|
Name: python-CacheControl
|
2023-06-19 15:25:11 +02:00
|
|
|
Version: 0.13.1
|
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
|
2023-06-19 15:25:11 +02:00
|
|
|
URL: https://github.com/psf/cachecontrol
|
|
|
|
Source: https://github.com/psf/cachecontrol/archive/v%{version}.tar.gz#/cachecontrol-%{version}.tar.gz
|
|
|
|
BuildRequires: %{python_module flit-core >= 3.2}
|
2023-05-30 09:54:41 +02:00
|
|
|
BuildRequires: %{python_module pip}
|
2018-03-23 16:14:07 +01:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2023-05-30 09:54:41 +02:00
|
|
|
BuildRequires: %{python_module wheel}
|
2018-03-23 16:14:07 +01:00
|
|
|
BuildRequires: fdupes
|
2018-12-04 18:10:38 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
2021-12-04 23:32:27 +01:00
|
|
|
Requires: python-msgpack >= 0.5.2
|
2023-06-19 15:25:11 +02:00
|
|
|
Requires: python-requests >= 2.16.0
|
2021-12-04 23:32:27 +01:00
|
|
|
Provides: python-cachecontrol = %{version}-%{release}
|
2020-05-28 09:35:26 +02:00
|
|
|
Requires(post): update-alternatives
|
2021-12-04 23:32:27 +01:00
|
|
|
Requires(postun):update-alternatives
|
2023-06-19 15:25:11 +02:00
|
|
|
Recommends: python-filelock >= 3.8.0
|
2018-03-23 16:14:07 +01:00
|
|
|
BuildArch: noarch
|
2018-12-04 18:10:38 +01:00
|
|
|
# SECTION test requirements
|
2021-12-04 23:32:27 +01:00
|
|
|
BuildRequires: %{python_module CherryPy}
|
2023-06-19 15:25:11 +02:00
|
|
|
BuildRequires: %{python_module filelock >= 3.8.0}
|
2021-12-04 23:32:27 +01:00
|
|
|
BuildRequires: %{python_module msgpack >= 0.5.2}
|
|
|
|
BuildRequires: %{python_module pytest}
|
2023-06-19 15:25:11 +02:00
|
|
|
BuildRequires: %{python_module requests >= 2.16.0}
|
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
|
2023-05-30 09:54:41 +02:00
|
|
|
%autosetup -p1 -n cachecontrol-%{version}
|
2018-03-23 16:14:07 +01:00
|
|
|
|
|
|
|
%build
|
2023-05-30 09:54:41 +02:00
|
|
|
%pyproject_wheel
|
2018-03-23 16:14:07 +01:00
|
|
|
|
|
|
|
%install
|
2023-05-30 09:54:41 +02:00
|
|
|
%pyproject_install
|
|
|
|
|
|
|
|
# do not pack tests
|
|
|
|
%python_expand rm -rf %{buildroot}%{$python_sitelib}/tests
|
|
|
|
|
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
|
2021-12-04 23:32:27 +01:00
|
|
|
%pytest -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
|
2021-12-04 23:32:27 +01:00
|
|
|
%{python_sitelib}/cachecontrol
|
2023-06-19 15:25:11 +02:00
|
|
|
%{python_sitelib}/cachecontrol-%{version}*-info
|
2018-03-23 16:14:07 +01:00
|
|
|
|
|
|
|
%changelog
|