]> git.pld-linux.org Git - packages/python-cachetools.git/blame - python-cachetools.spec
rebuild with python 3.10
[packages/python-cachetools.git] / python-cachetools.spec
CommitLineData
19ecff7c
MK
1#
2# Conditional build:
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
7
8%define module cachetools
9Summary: Various cache implementations based on different cache algorithms
10Summary(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)
12Name: python-%{module}
4285a92c 13Version: 0.7.0
d79e3347 14Release: 9
19ecff7c
MK
15License: MIT
16Group: Libraries/Python
17
18Source0: https://pypi.python.org/packages/source/c/%{module}/%{module}-%{version}.tar.gz
4285a92c 19# Source0-md5: c67ebb099e7607b689f79b2869585d36
19ecff7c
MK
20URL: https://github.com/tkem/cachetools
21BuildRequires: rpm-pythonprov
22# if py_postclean is used
5e22599f 23BuildRequires: rpmbuild(macros) >= 1.710
19ecff7c
MK
24%if %{with python2}
25BuildRequires: python-distribute
26%endif
27%if %{with python3}
28BuildRequires: python3-distribute
29BuildRequires: python3-modules
30%endif
31Requires: python-modules
32BuildArch: noarch
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
36This module provides various cache implementations based on different cache algorithms,
37as well as decorators for easily memoizing function and method calls.
38
39%description -l pl.UTF-8
40Moduł dostarcza rózne implementacje cache'u bazujące na róznych algorytmach, jak również
41dektoratory do łatwego zapamiętywania wyników funcji i metod.
42
43%package -n python3-%{module}
44Summary: Various cache implementations based on different cache algorithms
45Summary(pl.UTF-8): Rózne implementacje cache bazujące na róznych algorytmach
46Group: Libraries/Python
47Requires: python3-modules
48
49%description -n python3-%{module}
50This module provides various cache implementations based on different cache algorithms,
51as well as decorators for easily memoizing function and method calls.
52
53%description -n python3-%{module} -l pl.UTF-8
54Moduł dostarcza rózne implementacje cache'u bazujące na róznych algorytmach, jak również
55dektoratory do łatwego zapamiętywania wyników funcji i metod.
56
57%package apidocs
58Summary: %{module} API documentation
59Summary(pl.UTF-8): Dokumentacja API %{module}
60Group: Documentation
61
62%description apidocs
63API documentation for %{module}.
64
65%description apidocs -l pl.UTF-8
66Dokumentacja API %{module}.
67
68%prep
69%setup -q -n %{module}-%{version}
70
71%build
72%if %{with python2}
3d265895 73%py_build %{?with_tests:test}
19ecff7c
MK
74%endif
75
76%if %{with python3}
3d265895 77%py3_build %{?with_tests:test}
19ecff7c
MK
78%endif
79
80%if %{with doc}
81cd docs
82%{__make} -j1 html
83rm -rf _build/html/_sources
84%endif
85
86%install
87rm -rf $RPM_BUILD_ROOT
88
89%if %{with python2}
3d265895 90%py_install
19ecff7c
MK
91
92%py_postclean
93%endif
94
95%if %{with python3}
3d265895 96%py3_install
19ecff7c
MK
97%endif
98
99%clean
100rm -rf $RPM_BUILD_ROOT
101
102%if %{with python2}
103%files
104%defattr(644,root,root,755)
4285a92c 105%doc LICENSE README.rst
19ecff7c
MK
106%{py_sitescriptdir}/%{module}
107%if "%{py_ver}" > "2.4"
108%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
109%endif
110%endif
111
112%if %{with python3}
113%files -n python3-%{module}
114%defattr(644,root,root,755)
4285a92c 115%doc LICENSE README.rst
19ecff7c
MK
116%{py3_sitescriptdir}/%{module}
117%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
118%endif
119
120%if %{with doc}
121%files apidocs
122%defattr(644,root,root,755)
123%doc docs/_build/html/*
124%endif
This page took 0.075242 seconds and 4 git commands to generate.