]> git.pld-linux.org Git - packages/python-repoze.lru.git/blob - python-repoze.lru.spec
68ee8a00c53c9a2428102e4eab85491339755218
[packages/python-repoze.lru.git] / python-repoze.lru.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5
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
9 Name:           python-%{module}
10 Version:        0.7
11 Release:        1
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
19 %if %{with tests}
20 BuildRequires:  python-coverage
21 BuildRequires:  python-nose
22 %endif
23 BuildRequires:  rpm-pythonprov
24 BuildRequires:  rpmbuild(macros) >= 1.714
25 %if %{with doc}
26 BuildRequires:  sphinx-pdg-2
27 %endif
28 Requires:       python-modules >= 1:2.7
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
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.
36
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.
42
43 %package apidocs
44 Summary:        API documentation for Python repoze.lru module
45 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona repoze.lru
46 Group:          Documentation
47
48 %description apidocs
49 API documentation for Python repoze.lru module.
50
51 %description apidocs -l pl.UTF-8
52 Dokumentacja API modułu Pythona repoze.lru.
53
54 %prep
55 %setup -q -n %{module}-%{version}
56
57 %build
58 %py_build %{?with_tests:test}
59
60 %if %{with doc}
61 PYTHONPATH=$(pwd) \
62 %{__make} -C docs html \
63         SPHINXBUILD=sphinx-build-2
64 %endif
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68
69 %py_install
70
71 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/repoze/lru/tests.py*
72
73 %py_postclean
74
75 %clean
76 rm -rf $RPM_BUILD_ROOT
77
78 %files
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
87
88 %if %{with doc}
89 %files apidocs
90 %defattr(644,root,root,755)
91 %doc docs/_build/html/{_static,*.html,*.js}
92 %endif
This page took 0.02647 seconds and 2 git commands to generate.