3 %bcond_with tests # unit tests (broken with python 2.7 and 3+)
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Mustache for Python 2
8 Summary(pl.UTF-8): Mustache dla Pythona 2
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/pystache/
15 Source0: https://files.pythonhosted.org/packages/source/p/pystache/pystache-%{version}.tar.gz
16 # Source0-md5: 485885e67a0f6411d5252e69b20a35ca
17 URL: https://pypi.org/project/pystache/
19 BuildRequires: python-modules >= 1:2.6
20 BuildRequires: python-setuptools
23 BuildRequires: python3-modules >= 1:3.2
24 BuildRequires: python3-setuptools
26 BuildRequires: rpm-pythonprov
27 BuildRequires: rpmbuild(macros) >= 1.714
28 Requires: python-modules >= 1:2.6
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 Pystache is a Python implementation of Mustache. Mustache is a
34 framework-agnostic, logic-free templating system inspired by ctemplate
35 and et. Like ctemplate, Mustache "emphasizes separating logic from
36 presentation: it is impossible to embed application logic in this
39 %description -l pl.UTF-8
40 Pystache to pythonowa implementacja Mustache. Mustache to niezależny
41 od szkieletu, wolny od logiki system szablonów, zainspirowany przez
42 ctemplate i et. Podobnie do ctemplate, Mustache kładzie nacisk na
43 oddzielenie logiki od prezentacji: nie da się osadzić logiki aplikacji
44 w tym języku szablonów".
46 %package -n python3-pystache
47 Summary: Mustache for Python 3
48 Summary(pl.UTF-8): Mustache dla Pythona 3
49 Group: Libraries/Python
50 Requires: python3-modules >= 1:3.2
52 %description -n python3-pystache
53 Pystache is a Python implementation of Mustache. Mustache is a
54 framework-agnostic, logic-free templating system inspired by ctemplate
55 and et. Like ctemplate, Mustache "emphasizes separating logic from
56 presentation: it is impossible to embed application logic in this
59 %description -n python3-pystache -l pl.UTF-8
60 Pystache to pythonowa implementacja Mustache. Mustache to niezależny
61 od szkieletu, wolny od logiki system szablonów, zainspirowany przez
62 ctemplate i et. Podobnie do ctemplate, Mustache kładzie nacisk na
63 oddzielenie logiki od prezentacji: nie da się osadzić logiki aplikacji
64 w tym języku szablonów".
67 %setup -q -n pystache-%{version}
71 %py_build %{?with_tests:test}
75 %py3_build %{?with_tests:test}
79 rm -rf $RPM_BUILD_ROOT
84 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/pystache/tests
85 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/pystache/commands/test* \
86 $RPM_BUILD_ROOT%{py3_sitescriptdir}/pystache/commands/__pycache__/test* \
87 $RPM_BUILD_ROOT%{_bindir}/pystache-test
89 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pystache{,-3}
96 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/pystache/tests
97 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/pystache/commands/test* \
98 $RPM_BUILD_ROOT%{_bindir}/pystache-test
100 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pystache{,-2}
101 ln -sf pystache-2 $RPM_BUILD_ROOT%{_bindir}/pystache
105 rm -rf $RPM_BUILD_ROOT
109 %defattr(644,root,root,755)
110 %doc HISTORY.md LICENSE README.md TODO.md
111 %attr(755,root,root) %{_bindir}/pystache
112 %attr(755,root,root) %{_bindir}/pystache-2
113 %{py_sitescriptdir}/pystache
114 %{py_sitescriptdir}/pystache-%{version}-py*.egg-info
118 %files -n python3-pystache
119 %defattr(644,root,root,755)
120 %doc HISTORY.md LICENSE README.md TODO.md
121 %attr(755,root,root) %{_bindir}/pystache-3
122 %{py3_sitescriptdir}/pystache
123 %{py3_sitescriptdir}/pystache-%{version}-py*.egg-info