3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # unit tests
6 %define module repoze.lru
7 Summary: A tiny LRU cache implementation and decorator
8 Summary(pl.UTF-8): Mała implementacja pamięci podręcznej LRU z dekoratorem
12 License: BSD-derived (http://www.repoze.org/LICENSE.txt)
13 Group: Libraries/Python
14 Source0: https://files.pythonhosted.org/packages/source/r/repoze.lru/repoze.lru-%{version}.tar.gz
15 # Source0-md5: c08cc030387e0b1fc53c5c7d964b35e2
16 URL: https://pypi.org/project/repoze.lru/
17 BuildRequires: python-modules >= 1:2.7
18 BuildRequires: python-setuptools
20 BuildRequires: python-coverage
21 BuildRequires: python-nose
23 BuildRequires: rpm-pythonprov
24 BuildRequires: rpmbuild(macros) >= 1.714
26 BuildRequires: sphinx-pdg-2
28 Requires: python-modules >= 1:2.7
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 repoze.lru is a LRU (least recently used) cache implementation. Keys
34 and values that are not used frequently will be evicted from the cache
35 faster than keys and values that are used frequently.
37 %description -l pl.UTF-8
38 repoze.lru to implementacja pamięci podręcznej LRU (least recently
39 used - z zastępowaniem najdawniej używanych elementów). Klucze i
40 wartości rzadziej używane będą usuwane z pamięci podręcznej szybciej,
41 niż klucze i wartości używane częściej.
44 Summary: API documentation for Python repoze.lru module
45 Summary(pl.UTF-8): Dokumentacja API modułu Pythona repoze.lru
49 API documentation for Python repoze.lru module.
51 %description apidocs -l pl.UTF-8
52 Dokumentacja API modułu Pythona repoze.lru.
55 %setup -q -n %{module}-%{version}
58 %py_build %{?with_tests:test}
62 %{__make} -C docs html \
63 SPHINXBUILD=sphinx-build-2
67 rm -rf $RPM_BUILD_ROOT
71 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/repoze/lru/tests.py*
76 rm -rf $RPM_BUILD_ROOT
79 %defattr(644,root,root,755)
80 %doc COPYRIGHT.txt LICENSE.txt README.rst
81 # XXX: shared with repoze.*
82 %dir %{py_sitescriptdir}/repoze
83 %dir %{py_sitescriptdir}/repoze/lru
84 %{py_sitescriptdir}/repoze/lru/*.py[co]
85 %{py_sitescriptdir}/%{module}-%{version}-py*-nspkg.pth
86 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
90 %defattr(644,root,root,755)
91 %doc docs/_build/html/{_static,*.html,*.js}