3 %bcond_with doc # don't build doc (not provided by package)
4 %bcond_without tests # do not perform "make test"
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 %define module cachetools
9 Summary: Various cache implementations based on different cache algorithms
10 Summary(pl.UTF-8): Rózne implementacje cache bazujące na róznych algorytmach
11 # Name must match the python module/package name (as in 'import' statement)
12 Name: python-%{module}
16 Group: Libraries/Python
18 Source0: https://pypi.python.org/packages/source/c/%{module}/%{module}-%{version}.tar.gz
19 # Source0-md5: c67ebb099e7607b689f79b2869585d36
20 URL: https://github.com/tkem/cachetools
21 BuildRequires: rpm-pythonprov
22 # if py_postclean is used
23 BuildRequires: rpmbuild(macros) >= 1.710
25 BuildRequires: python-distribute
28 BuildRequires: python3-distribute
29 BuildRequires: python3-modules
31 Requires: python-modules
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 This module provides various cache implementations based on different cache algorithms,
37 as well as decorators for easily memoizing function and method calls.
39 %description -l pl.UTF-8
40 Moduł dostarcza rózne implementacje cache'u bazujące na róznych algorytmach, jak również
41 dektoratory do łatwego zapamiętywania wyników funcji i metod.
43 %package -n python3-%{module}
44 Summary: Various cache implementations based on different cache algorithms
45 Summary(pl.UTF-8): Rózne implementacje cache bazujące na róznych algorytmach
46 Group: Libraries/Python
47 Requires: python3-modules
49 %description -n python3-%{module}
50 This module provides various cache implementations based on different cache algorithms,
51 as well as decorators for easily memoizing function and method calls.
53 %description -n python3-%{module} -l pl.UTF-8
54 Moduł dostarcza rózne implementacje cache'u bazujące na róznych algorytmach, jak również
55 dektoratory do łatwego zapamiętywania wyników funcji i metod.
58 Summary: %{module} API documentation
59 Summary(pl.UTF-8): Dokumentacja API %{module}
63 API documentation for %{module}.
65 %description apidocs -l pl.UTF-8
66 Dokumentacja API %{module}.
69 %setup -q -n %{module}-%{version}
73 %py_build %{?with_tests:test}
77 %py3_build %{?with_tests:test}
83 rm -rf _build/html/_sources
87 rm -rf $RPM_BUILD_ROOT
100 rm -rf $RPM_BUILD_ROOT
104 %defattr(644,root,root,755)
105 %doc LICENSE README.rst
106 %{py_sitescriptdir}/%{module}
107 %if "%{py_ver}" > "2.4"
108 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
113 %files -n python3-%{module}
114 %defattr(644,root,root,755)
115 %doc LICENSE README.rst
116 %{py3_sitescriptdir}/%{module}
117 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
122 %defattr(644,root,root,755)
123 %doc docs/_build/html/*