]> git.pld-linux.org Git - packages/python-pystache.git/blame - python-pystache.spec
rebuild with python 3.10
[packages/python-pystache.git] / python-pystache.spec
CommitLineData
a47ba015
JB
1#
2# Conditional build:
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
6
7Summary: Mustache for Python 2
8Summary(pl.UTF-8): Mustache dla Pythona 2
9Name: python-pystache
10Version: 0.5.4
a907d3ce 11Release: 4
a47ba015
JB
12License: MIT
13Group: Libraries/Python
14#Source0Download: https://pypi.org/simple/pystache/
15Source0: https://files.pythonhosted.org/packages/source/p/pystache/pystache-%{version}.tar.gz
16# Source0-md5: 485885e67a0f6411d5252e69b20a35ca
17URL: https://pypi.org/project/pystache/
18%if %{with python2}
19BuildRequires: python-modules >= 1:2.6
20BuildRequires: python-setuptools
21%endif
22%if %{with python3}
23BuildRequires: python3-modules >= 1:3.2
24BuildRequires: python3-setuptools
25%endif
26BuildRequires: rpm-pythonprov
27BuildRequires: rpmbuild(macros) >= 1.714
28Requires: python-modules >= 1:2.6
29BuildArch: noarch
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33Pystache is a Python implementation of Mustache. Mustache is a
34framework-agnostic, logic-free templating system inspired by ctemplate
35and et. Like ctemplate, Mustache "emphasizes separating logic from
36presentation: it is impossible to embed application logic in this
37template language."
38
39%description -l pl.UTF-8
40Pystache to pythonowa implementacja Mustache. Mustache to niezależny
41od szkieletu, wolny od logiki system szablonów, zainspirowany przez
42ctemplate i et. Podobnie do ctemplate, Mustache kładzie nacisk na
43oddzielenie logiki od prezentacji: nie da się osadzić logiki aplikacji
44w tym języku szablonów".
45
46%package -n python3-pystache
47Summary: Mustache for Python 3
48Summary(pl.UTF-8): Mustache dla Pythona 3
49Group: Libraries/Python
50Requires: python3-modules >= 1:3.2
51
52%description -n python3-pystache
53Pystache is a Python implementation of Mustache. Mustache is a
54framework-agnostic, logic-free templating system inspired by ctemplate
55and et. Like ctemplate, Mustache "emphasizes separating logic from
56presentation: it is impossible to embed application logic in this
57template language."
58
59%description -n python3-pystache -l pl.UTF-8
60Pystache to pythonowa implementacja Mustache. Mustache to niezależny
61od szkieletu, wolny od logiki system szablonów, zainspirowany przez
62ctemplate i et. Podobnie do ctemplate, Mustache kładzie nacisk na
63oddzielenie logiki od prezentacji: nie da się osadzić logiki aplikacji
64w tym języku szablonów".
65
66%prep
67%setup -q -n pystache-%{version}
68
69%build
70%if %{with python2}
71%py_build %{?with_tests:test}
72%endif
73
74%if %{with python3}
75%py3_build %{?with_tests:test}
76%endif
77
78%install
79rm -rf $RPM_BUILD_ROOT
80
81%if %{with python3}
82%py3_install
83
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
88
89%{__mv} $RPM_BUILD_ROOT%{_bindir}/pystache{,-3}
90%endif
91
92%if %{with python2}
93%py_install
94
95%py_postclean
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
99
100%{__mv} $RPM_BUILD_ROOT%{_bindir}/pystache{,-2}
101ln -sf pystache-2 $RPM_BUILD_ROOT%{_bindir}/pystache
102%endif
103
104%clean
105rm -rf $RPM_BUILD_ROOT
106
107%if %{with python2}
108%files
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
115%endif
116
117%if %{with python3}
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
124%endif
This page took 0.075945 seconds and 4 git commands to generate.