]>
Commit | Line | Data |
---|---|---|
524b49ee MK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # don't build doc | |
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 flask-cache | |
9 | Summary: Cache support to Flask application | |
10 | Summary(pl.UTF-8): Wsparcie dla cache w aplikacjach Flask | |
11 | Name: python-%{module} | |
12 | Version: 0.13.1 | |
c6007a24 | 13 | Release: 4 |
524b49ee MK |
14 | License: BSD |
15 | Group: Libraries/Python | |
16 | Source0: https://pypi.python.org/packages/source/F/Flask-Cache/Flask-Cache-%{version}.tar.gz | |
17 | # Source0-md5: ab82a9cd0844891ccdb54fbb93fd6c59 | |
18 | URL: http://github.com/thadeusb/flask-cache | |
19 | BuildRequires: rpm-pythonprov | |
204bac09 | 20 | BuildRequires: rpmbuild(macros) >= 1.710 |
524b49ee | 21 | BuildRequires: sphinx-pdg |
524b49ee MK |
22 | %if %{with python2} |
23 | BuildRequires: python-distribute | |
b7051f36 ER |
24 | %if %{with tests} |
25 | BuildRequires: python-flask | |
26 | %endif | |
524b49ee MK |
27 | %endif |
28 | %if %{with python3} | |
29 | BuildRequires: python3-distribute | |
30 | BuildRequires: python3-modules | |
b7051f36 ER |
31 | %if %{with tests} |
32 | BuildRequires: python3-flask | |
33 | %endif | |
524b49ee MK |
34 | %endif |
35 | Requires: python-modules | |
36 | BuildArch: noarch | |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
38 | ||
39 | %description | |
40 | Cache support to Flask application | |
41 | ||
42 | %description -l pl.UTF-8 | |
43 | Wsparcie dla cache w aplikacjach Flask | |
44 | ||
45 | %package -n python3-%{module} | |
46 | Summary: Cache support to Flask application | |
47 | Summary(pl.UTF-8): Wsparcie dla cache w aplikacjach Flask | |
48 | Group: Libraries/Python | |
49 | Requires: python3-modules | |
50 | ||
51 | %description -n python3-%{module} | |
52 | Cache support to Flask application | |
53 | ||
54 | %description -n python3-%{module} -l pl.UTF-8 | |
55 | Wsparcie dla cache w aplikacjach Flask | |
56 | ||
57 | %package apidocs | |
58 | Summary: %{module} API documentation | |
59 | Summary(pl.UTF-8): Dokumentacja API %{module} | |
60 | Group: Documentation | |
61 | ||
62 | %description apidocs | |
63 | API documentation for %{module}. | |
64 | ||
65 | %description apidocs -l pl.UTF-8 | |
66 | Dokumentacja API %{module}. | |
67 | ||
68 | %prep | |
69 | %setup -q -n Flask-Cache-%{version} | |
70 | ||
71 | %build | |
72 | %if %{with python2} | |
4fd30f77 | 73 | %py_build %{?with_tests:test} |
524b49ee MK |
74 | %endif |
75 | ||
76 | %if %{with python3} | |
4fd30f77 | 77 | %py3_build %{?with_tests:test} |
524b49ee MK |
78 | %endif |
79 | ||
80 | %if %{with doc} | |
81 | cd docs | |
82 | %{__make} -j1 html | |
83 | rm -rf _build/html/_sources | |
84 | %endif | |
85 | ||
86 | %install | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %if %{with python2} | |
4fd30f77 | 90 | %py_install |
524b49ee MK |
91 | |
92 | %py_postclean | |
93 | %endif | |
94 | ||
95 | %if %{with python3} | |
4fd30f77 | 96 | %py3_install |
524b49ee MK |
97 | %endif |
98 | ||
99 | %clean | |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
102 | %if %{with python2} | |
103 | %files | |
104 | %defattr(644,root,root,755) | |
105 | %doc CHANGES README LICENSE | |
106 | %{py_sitescriptdir}/flask_cache | |
107 | %if "%{py_ver}" > "2.4" | |
108 | %{py_sitescriptdir}/Flask_Cache-%{version}-py*.egg-info | |
109 | %endif | |
110 | %endif | |
111 | ||
112 | %if %{with python3} | |
113 | %files -n python3-%{module} | |
114 | %defattr(644,root,root,755) | |
115 | %doc CHANGES README LICENSE | |
116 | %{py3_sitescriptdir}/flask_cache | |
117 | %{py3_sitescriptdir}/Flask_Cache-%{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 |