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