]>
Commit | Line | Data |
---|---|---|
e0e57580 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # unit tests (not included in release package) | |
4 | %bcond_without python2 # CPython 2.x module | |
5 | %bcond_without python3 # CPython 3.x module | |
6 | ||
7 | Summary: Leightweight template library | |
8 | Summary(pl.UTF-8): Lekka biblioteka szablonów | |
9 | Name: python-wheezy.template | |
10 | Version: 0.1.195 | |
c02f8b6a | 11 | Release: 2 |
e0e57580 JB |
12 | License: MIT |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://pypi.org/simple/wheezy.template/ | |
15 | Source0: https://files.pythonhosted.org/packages/source/w/wheezy.template/wheezy.template-%{version}.tar.gz | |
16 | # Source0-md5: d6820542cebd340c34756cbb4485fbce | |
17 | URL: https://pypi.org/project/wheezy.template/ | |
18 | %if %{with python2} | |
19 | BuildRequires: python-Cython | |
20 | BuildRequires: python-modules >= 1:2.5 | |
21 | BuildRequires: python-setuptools | |
22 | %if %{with tests} | |
23 | BuildRequires: python-pytest | |
24 | %endif | |
25 | %endif | |
26 | %if %{with python3} | |
27 | BuildRequires: python3-Cython | |
28 | BuildRequires: python3-modules >= 1:3.2 | |
29 | BuildRequires: python3-setuptools | |
30 | %if %{with tests} | |
31 | BuildRequires: python3-pytest | |
32 | %endif | |
33 | %endif | |
34 | BuildRequires: rpm-pythonprov | |
35 | BuildRequires: rpmbuild(macros) >= 1.714 | |
36 | Requires: python-modules >= 1:2.5 | |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
38 | ||
39 | %description | |
40 | wheezy.template is a Python package written in pure Python code. It is | |
41 | a lightweight template library. The design goals achieved: | |
42 | - Compact, Expressive, Clean: Minimizes the number of keystrokes | |
43 | required to build a template. Enables fast and well read coding. | |
44 | - Intuitive, No time to Learn: Basic Python programming skills | |
45 | plus HTML markup. | |
46 | - Do Not Repeat Yourself: Master layout templates for inheritance; | |
47 | include and import directives for maximum reuse. | |
48 | - Blazingly Fast: Maximum rendering performance: ultimate speed and | |
49 | context preprocessor features. | |
50 | ||
51 | %description -l pl.UTF-8 | |
52 | wheezy.template to pakiet Pythona napisany w czystym Pythonie, będący | |
53 | lekką biblioteką szablonów. Osiągnięte cele projektu: | |
54 | - zwięzłość, wyrazistość, czystość: do stworzenia szablonu wymagana | |
55 | jest minimalna liczba naciśnięć klawiszy. Pozwala to na szybkie i | |
56 | czytelne kodowanie. | |
57 | - intuicyjność, minimalny czas nauki: podstawy programowania w | |
58 | Pythonie plus znaczniki HTML. | |
59 | - brak powtarzania kodu: główne szablony wyglądu do dziedziczenia; | |
60 | dyrektywy włączające i importujące, pozwalające na maksymalne | |
61 | ponowne używanie. | |
62 | - szybkość: duża wydajność renderowania. | |
63 | ||
64 | %package -n python3-wheezy.template | |
65 | Summary: Leightweight template library | |
66 | Summary(pl.UTF-8): Lekka biblioteka szablonów | |
67 | Group: Libraries/Python | |
68 | Requires: python3-modules >= 1:3.2 | |
69 | ||
70 | %description -n python3-wheezy.template | |
71 | wheezy.template is a Python package written in pure Python code. It is | |
72 | a lightweight template library. The design goals achieved: | |
73 | - Compact, Expressive, Clean: Minimizes the number of keystrokes | |
74 | required to build a template. Enables fast and well read coding. | |
75 | - Intuitive, No time to Learn: Basic Python programming skills | |
76 | plus HTML markup. | |
77 | - Do Not Repeat Yourself: Master layout templates for inheritance; | |
78 | include and import directives for maximum reuse. | |
79 | - Blazingly Fast: Maximum rendering performance: ultimate speed and | |
80 | context preprocessor features. | |
81 | ||
82 | %description -n python3-wheezy.template -l pl.UTF-8 | |
83 | wheezy.template to pakiet Pythona napisany w czystym Pythonie, będący | |
84 | lekką biblioteką szablonów. Osiągnięte cele projektu: | |
85 | - zwięzłość, wyrazistość, czystość: do stworzenia szablonu wymagana | |
86 | jest minimalna liczba naciśnięć klawiszy. Pozwala to na szybkie i | |
87 | czytelne kodowanie. | |
88 | - intuicyjność, minimalny czas nauki: podstawy programowania w | |
89 | Pythonie plus znaczniki HTML. | |
90 | - brak powtarzania kodu: główne szablony wyglądu do dziedziczenia; | |
91 | dyrektywy włączające i importujące, pozwalające na maksymalne | |
92 | ponowne używanie. | |
93 | - szybkość: duża wydajność renderowania. | |
94 | ||
95 | %prep | |
96 | %setup -q -n wheezy.template-%{version} | |
97 | ||
98 | %build | |
99 | %if %{with python2} | |
100 | %py_build | |
101 | ||
102 | %if %{with tests} | |
103 | %{__python} -m pytest | |
104 | %endif | |
105 | %endif | |
106 | ||
107 | %if %{with python3} | |
108 | %py3_build | |
109 | ||
110 | %if %{with tests} | |
111 | %{__python3} -m pytest | |
112 | %endif | |
113 | %endif | |
114 | ||
115 | %install | |
116 | rm -rf $RPM_BUILD_ROOT | |
117 | ||
118 | %if %{with python2} | |
119 | %py_install | |
120 | ||
121 | %py_postclean | |
122 | ||
123 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/wheezy.template{,-2} | |
124 | %endif | |
125 | ||
126 | %if %{with python3} | |
127 | %py3_install | |
128 | ||
129 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/wheezy.template{,-3} | |
130 | ln -s wheezy-template-3 $RPM_BUILD_ROOT%{_bindir}/wheezy.template | |
131 | %endif | |
132 | ||
133 | %clean | |
134 | rm -rf $RPM_BUILD_ROOT | |
135 | ||
136 | %if %{with python2} | |
137 | %files | |
138 | %defattr(644,root,root,755) | |
139 | %doc LICENSE README.md | |
140 | %attr(755,root,root) %{_bindir}/wheezy.template-2 | |
141 | %dir %{py_sitedir}/wheezy | |
142 | %dir %{py_sitedir}/wheezy/template | |
143 | %{py_sitedir}/wheezy/template/*.py[co] | |
144 | %attr(755,root,root) %{py_sitedir}/wheezy/template/*.so | |
145 | %dir %{py_sitedir}/wheezy/template/ext | |
146 | %{py_sitedir}/wheezy/template/ext/*.py[co] | |
147 | %attr(755,root,root) %{py_sitedir}/wheezy/template/ext/*.so | |
148 | %{py_sitedir}/wheezy.template-%{version}-py*-nspkg.pth | |
149 | %{py_sitedir}/wheezy.template-%{version}-py*.egg-info | |
150 | %endif | |
151 | ||
152 | %if %{with python3} | |
153 | %files -n python3-wheezy.template | |
154 | %defattr(644,root,root,755) | |
155 | %doc LICENSE README.md | |
156 | %attr(755,root,root) %{_bindir}/wheezy.template | |
157 | %attr(755,root,root) %{_bindir}/wheezy.template-3 | |
158 | %dir %{py3_sitedir}/wheezy | |
159 | %dir %{py3_sitedir}/wheezy/template | |
160 | %{py3_sitedir}/wheezy/template/*.py | |
161 | %{py3_sitedir}/wheezy/template/__pycache__ | |
162 | %attr(755,root,root) %{py3_sitedir}/wheezy/template/*.cpython-*.so | |
163 | %dir %{py3_sitedir}/wheezy/template/ext | |
164 | %{py3_sitedir}/wheezy/template/ext/*.py | |
165 | %{py3_sitedir}/wheezy/template/ext/__pycache__ | |
166 | %attr(755,root,root) %{py3_sitedir}/wheezy/template/ext/*.cpython-*.so | |
167 | %{py3_sitedir}/wheezy.template-%{version}-py*-nspkg.pth | |
168 | %{py3_sitedir}/wheezy.template-%{version}-py*.egg-info | |
169 | %endif |