774a1f8
# Created by pyp2rpm-1.1.0b
774a1f8
%global pypi_name CacheControl
774a1f8
%global pypi_name_lower cachecontrol
774a1f8
774a1f8
Name:           python-%{pypi_name}
b13d5fd
Version:        0.12.5
db91cce
Release:        2%{?dist}
774a1f8
Summary:        httplib2 caching for requests
774a1f8
774a1f8
License:        MIT
774a1f8
URL:            https://github.com/ionrock/cachecontrol
b13d5fd
Source0:        %{url}/archive/v%{version}/%{pypi_name_lower}-%{version}.tar.gz
774a1f8
BuildArch:      noarch
774a1f8
2b7c84c
%global _description\
2b7c84c
CacheControl is a port of the caching algorithms in httplib2_ for use with\
2b7c84c
requests_ session object. It was written because httplib2's better support\
2b7c84c
for caching is often mitigated by its lack of threadsafety. The same is\
2b7c84c
true of requests in terms of caching.
2b7c84c
2b7c84c
%description %_description
2b7c84c
774a1f8
%package -n     python3-%{pypi_name}
774a1f8
Summary:        httplib2 caching for requests
774a1f8
Tomas Krizek 62500cd
BuildRequires:  python3-cherrypy
774a1f8
BuildRequires:  python3-devel
774a1f8
BuildRequires:  python3-pytest
774a1f8
BuildRequires:  python3-lockfile
Tomas Krizek 62500cd
BuildRequires:  python3-msgpack
774a1f8
BuildRequires:  python3-redis
774a1f8
BuildRequires:  python3-requests
774a1f8
b13d5fd
%{?python_provide:%python_provide python3-%{pypi_name}}
b13d5fd
b13d5fd
%?python_enable_dependency_generator
774a1f8
774a1f8
%description -n python3-%{pypi_name}
774a1f8
CacheControl is a port of the caching algorithms in httplib2_ for use with
774a1f8
requests_ session object. It was written because httplib2's better support
774a1f8
for caching is often mitigated by its lack of threadsafety. The same is
774a1f8
true of requests in terms of caching.
774a1f8
This is the Python 3 build of CacheControl.
774a1f8
774a1f8
774a1f8
%prep
b13d5fd
%setup -q -n %{pypi_name_lower}-%{version}
774a1f8
b13d5fd
# use mock from stdlib
b13d5fd
sed -i 's/^from mock import/from unittest.mock import/g' tests/*.py
b13d5fd
sed -i 's/^import mock/from unittest import mock/g' tests/*.py
774a1f8
774a1f8
%build
b13d5fd
%py3_build
774a1f8
774a1f8
774a1f8
%install
b13d5fd
%py3_install
774a1f8
774a1f8
774a1f8
%check
d0a77dd
# skip a test requiring internet access
b13d5fd
%{__python3} -m pytest -v tests -k "not test_file_cache_recognizes_consumed_file_handle"
774a1f8
774a1f8
774a1f8
%files -n python3-%{pypi_name}
774a1f8
%doc README.rst
b13d5fd
%license LICENSE.txt
b13d5fd
%{python3_sitelib}/%{pypi_name_lower}/
774a1f8
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
Tomas Krizek 62500cd
%{_bindir}/doesitcache
774a1f8
774a1f8
774a1f8
%changelog
db91cce
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.5-2
db91cce
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
db91cce
b13d5fd
* Thu Aug 16 2018 Miro Hrončok <mhroncok@redhat.com> - 0.12.5-1
b13d5fd
- Update to 0.12.5
b13d5fd
- Remove python2 subpackage
b13d5fd
d4cc13c
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.3-6
d4cc13c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
d4cc13c
e242ef3
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.12.3-5
e242ef3
- Rebuilt for Python 3.7
e242ef3
edf609c
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.3-4
edf609c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
edf609c
325ec2f
* Mon Jan 15 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.12.3-3
325ec2f
- Update Python 2 dependency declarations to new packaging standards
325ec2f
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
325ec2f
Iryna Shcherbina 104423c
* Wed Sep 13 2017 Iryna Shcherbina <ishcherb@redhat.com> - 0.10.0-2
Iryna Shcherbina 104423c
- Fix Python 2 dependency from python3-CacheControl (rhbz#1490893)
Iryna Shcherbina 104423c
Tomas Krizek 62500cd
* Wed Aug 23 2017 Tomas Krizek <tkrizek@redhat.com> - 0.12.3-1
Tomas Krizek 62500cd
- Update to 0.12.3
Tomas Krizek 62500cd
2b7c84c
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.11.5-8
2b7c84c
- Python 2 binary package renamed to python2-cachecontrol
2b7c84c
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
2b7c84c
5a1df67
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.5-7
5a1df67
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
5a1df67
c9de5b0
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.5-6
c9de5b0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
c9de5b0
8741733
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.11.5-5
8741733
- Rebuild for Python 3.6
8741733
422c679
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11.5-4
422c679
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
422c679
87e4b24
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.5-3
87e4b24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
87e4b24
0f49196
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11.5-2
0f49196
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
0f49196
e2ed640
* Fri Jun 19 2015 Slavek Kabrda <bkabrda@redhat.com> - 0.11.5-1
e2ed640
- Update to 0.11.5
e2ed640
a2e943e
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.1-2
a2e943e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
a2e943e
774a1f8
* Wed Jun 04 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.10.1-1
774a1f8
- Initial package.