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