]> git.pld-linux.org Git - SPECS.git/blob - python-repoze.lru.spec
SPECS updated Wed 1 May 10:14:00 CEST 2024
[SPECS.git] / python-repoze.lru.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 %define         module  repoze.lru
9 Summary:        A tiny LRU cache implementation and decorator
10 Summary(pl.UTF-8):      Mała implementacja pamięci podręcznej LRU z dekoratorem
11 Name:           python-%{module}
12 Version:        0.7
13 Release:        1
14 License:        BSD-derived (http://www.repoze.org/LICENSE.txt)
15 Group:          Libraries/Python
16 Source0:        https://files.pythonhosted.org/packages/source/r/repoze.lru/repoze.lru-%{version}.tar.gz
17 # Source0-md5:  c08cc030387e0b1fc53c5c7d964b35e2
18 URL:            https://pypi.org/project/repoze.lru/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-coverage
24 BuildRequires:  python-nose
25 %endif
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-modules >= 1:3.4
29 BuildRequires:  python3-setuptools
30 %if %{with tests}
31 BuildRequires:  python3-coverage
32 BuildRequires:  python3-nose
33 %endif
34 %endif
35 BuildRequires:  rpm-pythonprov
36 BuildRequires:  rpmbuild(macros) >= 1.714
37 %if %{with doc}
38 BuildRequires:  sphinx-pdg-2
39 %endif
40 Requires:       python-modules >= 1:2.7
41 BuildArch:      noarch
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 repoze.lru is a LRU (least recently used) cache implementation. Keys
46 and values that are not used frequently will be evicted from the cache
47 faster than keys and values that are used frequently.
48
49 %description -l pl.UTF-8
50 repoze.lru to implementacja pamięci podręcznej LRU (least recently
51 used - z zastępowaniem najdawniej używanych elementów). Klucze i
52 wartości rzadziej używane będą usuwane z pamięci podręcznej szybciej,
53 niż klucze i wartości używane częściej.
54
55 %package -n python3-%{module}
56 Summary:        A tiny LRU cache implementation and decorator
57 Summary(pl.UTF-8):      Mała implementacja pamięci podręcznej LRU z dekoratorem
58 Group:          Libraries/Python
59 Requires:       python3-modules >= 1:3.2
60
61 %description -n python3-%{module}
62 repoze.lru is a LRU (least recently used) cache implementation. Keys
63 and values that are not used frequently will be evicted from the cache
64 faster than keys and values that are used frequently.
65
66 %description -n python3-%{module} -l pl.UTF-8
67 repoze.lru to implementacja pamięci podręcznej LRU (least recently
68 used - z zastępowaniem najdawniej używanych elementów). Klucze i
69 wartości rzadziej używane będą usuwane z pamięci podręcznej szybciej,
70 niż klucze i wartości używane częściej.
71
72 %package apidocs
73 Summary:        API documentation for Python repoze.lru module
74 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona repoze.lru
75 Group:          Documentation
76
77 %description apidocs
78 API documentation for Python repoze.lru module.
79
80 %description apidocs -l pl.UTF-8
81 Dokumentacja API modułu Pythona repoze.lru.
82
83 %prep
84 %setup -q -n %{module}-%{version}
85
86 %build
87 %if %{with python2}
88 %py_build %{?with_tests:test}
89 %endif
90
91 %if %{with python3}
92 %py3_build %{?with_tests:test}
93 %endif
94
95 %if %{with doc}
96 PYTHONPATH=$(pwd) \
97 %{__make} -C docs html \
98         SPHINXBUILD=sphinx-build-2
99 %endif
100
101 %install
102 rm -rf $RPM_BUILD_ROOT
103
104 %if %{with python2}
105 %py_install
106
107 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/repoze/lru/tests.py*
108 %py_postclean
109 %endif
110
111 %if %{with python3}
112 %py3_install
113
114 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/repoze/lru/tests.py
115 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/repoze/lru/__pycache__/tests.*.py*
116 %endif
117
118 %clean
119 rm -rf $RPM_BUILD_ROOT
120
121 %if %{with python2}
122 %files
123 %defattr(644,root,root,755)
124 %doc COPYRIGHT.txt LICENSE.txt README.rst
125 # XXX: shared with repoze.*
126 %dir %{py_sitescriptdir}/repoze
127 %{py_sitescriptdir}/repoze/lru
128 %{py_sitescriptdir}/repoze.lru-%{version}-py*-nspkg.pth
129 %{py_sitescriptdir}/repoze.lru-%{version}-py*.egg-info
130 %endif
131
132 %if %{with python3}
133 %files -n python3-%{module}
134 %defattr(644,root,root,755)
135 %doc COPYRIGHT.txt LICENSE.txt README.rst
136 # XXX: shared with repoze.*
137 %dir %{py3_sitescriptdir}/repoze
138 %{py3_sitescriptdir}/repoze/lru
139 %{py3_sitescriptdir}/repoze.lru-%{version}-py*-nspkg.pth
140 %{py3_sitescriptdir}/repoze.lru-%{version}-py*.egg-info
141 %endif
142
143 %if %{with doc}
144 %files apidocs
145 %defattr(644,root,root,755)
146 %doc docs/_build/html/{_static,*.html,*.js}
147 %endif
This page took 0.143397 seconds and 4 git commands to generate.