[packages/python-repoze.lru] - updated to 0.7, added -apidocs

qboosh qboosh at pld-linux.org
Sat Oct 28 21:21:47 CEST 2023


commit 4b89daab8725f538207c2951c6cf71ed35b76a51
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Oct 28 20:08:31 2023 +0200

    - updated to 0.7, added -apidocs

 python-repoze.lru.spec | 67 +++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 52 insertions(+), 15 deletions(-)
---
diff --git a/python-repoze.lru.spec b/python-repoze.lru.spec
index cf98985..68ee8a0 100644
--- a/python-repoze.lru.spec
+++ b/python-repoze.lru.spec
@@ -1,21 +1,31 @@
 #
 # Conditional build:
-%bcond_without	tests	# do not perform "make test"
+%bcond_without	doc	# Sphinx documentation
+%bcond_without	tests	# unit tests
 
 %define 	module	repoze.lru
 Summary:	A tiny LRU cache implementation and decorator
+Summary(pl.UTF-8):	Mała implementacja pamięci podręcznej LRU z dekoratorem
 Name:		python-%{module}
-Version:	0.6
-Release:	3
+Version:	0.7
+Release:	1
 License:	BSD-derived (http://www.repoze.org/LICENSE.txt)
 Group:		Libraries/Python
-Source0:	http://pypi.python.org/packages/source/r/repoze.lru/repoze.lru-%{version}.tar.gz
-# Source0-md5:	2c3b64b17a8e18b405f55d46173e14dd
-URL:		http://pypi.python.org/pypi/repoze.lru
-BuildRequires:	python-distribute
+Source0:	https://files.pythonhosted.org/packages/source/r/repoze.lru/repoze.lru-%{version}.tar.gz
+# Source0-md5:	c08cc030387e0b1fc53c5c7d964b35e2
+URL:		https://pypi.org/project/repoze.lru/
+BuildRequires:	python-modules >= 1:2.7
+BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	python-coverage
+BuildRequires:	python-nose
+%endif
 BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.710
-Requires:	python-modules
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires:	sphinx-pdg-2
+%endif
+Requires:	python-modules >= 1:2.7
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -24,22 +34,42 @@ repoze.lru is a LRU (least recently used) cache implementation. Keys
 and values that are not used frequently will be evicted from the cache
 faster than keys and values that are used frequently.
 
+%description -l pl.UTF-8
+repoze.lru to implementacja pamięci podręcznej LRU (least recently
+used - z zastępowaniem najdawniej używanych elementów). Klucze i
+wartości rzadziej używane będą usuwane z pamięci podręcznej szybciej,
+niż klucze i wartości używane częściej.
+
+%package apidocs
+Summary:	API documentation for Python repoze.lru module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona repoze.lru
+Group:		Documentation
+
+%description apidocs
+API documentation for Python repoze.lru module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona repoze.lru.
+
 %prep
 %setup -q -n %{module}-%{version}
 
 %build
-%py_build
+%py_build %{?with_tests:test}
 
-%{?with_tests:%{__python} setup.py test}
+%if %{with doc}
+PYTHONPATH=$(pwd) \
+%{__make} -C docs html \
+	SPHINXBUILD=sphinx-build-2
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
 %py_install
 
 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/repoze/lru/tests.py*
 
-%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
-%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
 %py_postclean
 
 %clean
@@ -47,9 +77,16 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc CHANGES.txt LICENSE.txt README.txt
-%dir %{py_sitescriptdir}/repoze/
+%doc COPYRIGHT.txt LICENSE.txt README.rst
+# XXX: shared with repoze.*
+%dir %{py_sitescriptdir}/repoze
 %dir %{py_sitescriptdir}/repoze/lru
 %{py_sitescriptdir}/repoze/lru/*.py[co]
 %{py_sitescriptdir}/%{module}-%{version}-py*-nspkg.pth
 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/{_static,*.html,*.js}
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-repoze.lru.git/commitdiff/4b89daab8725f538207c2951c6cf71ed35b76a51



More information about the pld-cvs-commit mailing list