[packages/python3-cachetools] - updated packaging
qboosh
qboosh at pld-linux.org
Mon Jun 2 21:59:13 CEST 2025
commit acd682b7ca55aa43c5883eb4118465f12f7f27a7
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon Jun 2 21:55:21 2025 +0200
- updated packaging
python3-cachetools.spec | 52 ++++++++++++++++++++++++++++++++-----------------
1 file changed, 34 insertions(+), 18 deletions(-)
---
diff --git a/python3-cachetools.spec b/python3-cachetools.spec
index 57d3987..ecb199a 100644
--- a/python3-cachetools.spec
+++ b/python3-cachetools.spec
@@ -1,55 +1,71 @@
#
# Conditional build:
-%bcond_with doc # don't build doc (not provided by package)
-%bcond_without tests # do not perform "make test"
+%bcond_with doc # Sphinx documentation (fails to build)
+%bcond_without tests # unit tests
%define module cachetools
-Summary: Various cache implementations based on different cache algorithms
-Summary(pl.UTF-8): Rózne implementacje cache bazujące na róznych algorytmach
+Summary: Extensible memoizing collections and decorators
+Summary(pl.UTF-8): Rozszerzalne kolekcje i dekoratory z pamięcią
Name: python3-%{module}
Version: 5.5.2
Release: 1
License: MIT
Group: Libraries/Python
-Source0: https://pypi.python.org/packages/source/c/%{module}/%{module}-%{version}.tar.gz
+#Source0Download: https://pypi.org/simple/cachetools/
+Source0: https://files.pythonhosted.org/packages/source/c/%{module}/%{module}-%{version}.tar.gz
# Source0-md5: bc4019928cf73ca154ff5416280282bb
URL: https://github.com/tkem/cachetools
+BuildRequires: python3-modules >= 1:3.7
+BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-pytest
+%endif
BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.710
-BuildRequires: python3-modules
-Requires: python3-modules
+BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires: sphinx-pdg-3
+%endif
+Requires: python3-modules >= 1:3.7
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-This module provides various cache implementations based on different cache algorithms,
-as well as decorators for easily memoizing function and method calls.
+This module provides various memoizing collections and decorators,
+including variants of the Python Standard Library's @lru_cache
+function decorator.
%description -l pl.UTF-8
-Moduł dostarcza rózne implementacje cache'u bazujące na róznych algorytmach, jak również
-dektoratory do łatwego zapamiętywania wyników funcji i metod.
+Ten moduł udostępnia różne kolekcje i dekoratory z pamięcią, w tym
+warianty dekoratora funkcji @lru_cache z biblioteki standardowej
+Pythona.
%package apidocs
Summary: %{module} API documentation
-Summary(pl.UTF-8): Dokumentacja API %{module}
+Summary(pl.UTF-8): Dokumentacja API modułu %{module}
Group: Documentation
%description apidocs
API documentation for %{module}.
%description apidocs -l pl.UTF-8
-Dokumentacja API %{module}.
+Dokumentacja API modułu %{module}.
%prep
%setup -q -n %{module}-%{version}
%build
-%py3_build %{?with_tests:test}
+%py3_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTHONPATH=$(pwd)/src \
+%{__python3} -m pytest tests
+%endif
%if %{with doc}
-cd docs
-%{__make} -j1 html
-rm -rf _build/html/_sources
+PYTHONPATH=$(pwd)/src \
+sphinx-build-3 -b html docs docs/_build/html \
+ SPHINXBUILD=sphinx-build-3
%endif
%install
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-cachetools.git/commitdiff/acd682b7ca55aa43c5883eb4118465f12f7f27a7
More information about the pld-cvs-commit
mailing list