]> git.pld-linux.org Git - packages/python-pystache.git/blob - python-pystache.spec
rebuild with python 3.10
[packages/python-pystache.git] / python-pystache.spec
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
7 Summary:        Mustache for Python 2
8 Summary(pl.UTF-8):      Mustache dla Pythona 2
9 Name:           python-pystache
10 Version:        0.5.4
11 Release:        5
12 License:        MIT
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/
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.6
20 BuildRequires:  python-setuptools
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3-modules >= 1:3.2
24 BuildRequires:  python3-setuptools
25 %endif
26 BuildRequires:  rpm-pythonprov
27 BuildRequires:  rpmbuild(macros) >= 1.714
28 Requires:       python-modules >= 1:2.6
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
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
37 template language."
38
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".
45
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
51
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
57 template language."
58
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".
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
79 rm -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}
101 ln -sf pystache-2 $RPM_BUILD_ROOT%{_bindir}/pystache
102 %endif
103
104 %clean
105 rm -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.081172 seconds and 3 git commands to generate.