[packages/python3-cachecontrol] - updated dependencies, added tests bcond
qboosh
qboosh at pld-linux.org
Sat May 31 20:21:17 CEST 2025
commit 4074b1eead152e18008e827fedc460f91a83f36c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat May 31 20:08:11 2025 +0200
- updated dependencies, added tests bcond
python3-cachecontrol.spec | 38 +++++++++++++++++++++++++++++++++-----
1 file changed, 33 insertions(+), 5 deletions(-)
---
diff --git a/python3-cachecontrol.spec b/python3-cachecontrol.spec
index aa0beb7..277f100 100644
--- a/python3-cachecontrol.spec
+++ b/python3-cachecontrol.spec
@@ -1,4 +1,10 @@
+# TODO: package cherrypy, finish tests
+#
+# Conditional build:
+%bcond_with tests # unit tests
+
Summary: httplib2 caching for requests
+Summary(pl.UTF-8): Pamięc podręczna httplib2 dla requests
Name: python3-cachecontrol
Version: 0.14.3
Release: 1
@@ -8,14 +14,23 @@ Group: Libraries/Python
Source0: https://files.pythonhosted.org/packages/source/c/cachecontrol/cachecontrol-%{version}.tar.gz
# Source0-md5: 13bb06e799622ac80ec3af936ed75de3
URL: https://pypi.org/project/CacheControl/
-BuildRequires: python3 >= 1:3.8
+BuildRequires: python3 >= 1:3.9
BuildRequires: python3-build
+BuildRequires: python3-flit_core >= 3.11
BuildRequires: python3-flit_core < 4
-BuildRequires: python3-flit_core >= 3.2
BuildRequires: python3-installer
-BuildRequires: python3-modules >= 1:3.8
+BuildRequires: python3-modules >= 1:3.9
+%if %{with tests}
+BuildRequires: python3-cherrypy
+BuildRequires: python3-filelock >= 3.8.0
+BuildRequires: python3-msgpack >= 0.5.2
+BuildRequires: python3-msgpack < 2
+BuildRequires: python3-requests >= 2.16.0
+BuildRequires: python3-pytest
+%endif
+BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 2.044
-Requires: python3-modules >= 1:3.8
+Requires: python3-modules >= 1:3.9
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -23,16 +38,29 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
CacheControl is a port of the caching algorithms in httplib2 for use
with requests session object.
-It was written because httplib2’s better support for caching is often
+It was written because httplib2's better support for caching is often
mitigated by its lack of thread safety. The same is true of requests
in terms of caching.
+%description -l pl.UTF-8
+CacheControl to port algorytmów cache'ujących z httplib2 do użycia z
+obiektami sesji requests.
+
+Port powstał, ponieważ lepsza obsługa pamięci podręcznej w httplib2
+jest zwykle niweczona przez brak dobrej obsługi wątków. Tak samo jest
+w przypadku pamięci podręcznej w requests.
+
%prep
%setup -q -n cachecontrol-%{version}
%build
%py3_build_pyproject
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest tests
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-cachecontrol.git/commitdiff/4074b1eead152e18008e827fedc460f91a83f36c
More information about the pld-cvs-commit
mailing list