]> git.pld-linux.org Git - SPECS.git/blob - python-Mako.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-Mako.spec
1 # TODO: beaker, dogpile.cache, lingua for tests
2 #
3 # Conditional build:
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6 %bcond_without  tests   # unit tests
7
8 %define         fname   Mako
9 Summary:        Templating system for Python
10 Summary(pl.UTF-8):      System szablonów dla języka Python
11 Name:           python-Mako
12 Version:        1.1.0
13 Release:        3
14 License:        MIT
15 Group:          Libraries/Python
16 #Source0Download: https://pypi.org/simple/mako/
17 Source0:        https://files.pythonhosted.org/packages/source/M/Mako/Mako-%{version}.tar.gz
18 # Source0-md5:  6c3f2da0b74af529a4c4a537d0848bf2
19 URL:            https://www.makotemplates.org/
20 %if %{with python2}
21 BuildRequires:  python >= 1:2.7
22 BuildRequires:  python-devel >= 1:2.7
23 BuildRequires:  python-setuptools
24 %if %{with tests}
25 BuildRequires:  python-babel
26 BuildRequires:  python-markupsafe >= 0.9.2
27 BuildRequires:  python-mock
28 BuildRequires:  python-pygments >= 1.4
29 BuildRequires:  python-pytest >= 3.1.0
30 %endif
31 %endif
32 %if %{with python3}
33 BuildRequires:  python3 >= 1:3.4
34 BuildRequires:  python3-devel >= 1:3.4
35 BuildRequires:  python3-modules >= 1:3.4
36 BuildRequires:  python3-setuptools
37 %if %{with tests}
38 BuildRequires:  python3-babel
39 BuildRequires:  python3-markupsafe >= 0.9.2
40 BuildRequires:  python3-pygments >= 1.4
41 BuildRequires:  python3-pytest >= 3.1.0
42 %endif
43 %endif
44 BuildRequires:  rpm-pythonprov
45 BuildRequires:  rpmbuild(macros) >= 1.714
46 Requires:       python-modules >= 1:2.6
47 BuildArch:      noarch
48 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50 %description
51 Mako is a template library written in Python. It provides a familiar,
52 non-XML syntax which compiles into Python modules for maximum
53 performance.
54
55 %description -l pl.UTF-8
56 Mako jest biblioteką szablonów napisaną w języku Python. Zapewnia
57 przyjazną, nie XML-ową składnię, która jest kompilowana do modułów
58 Pythona dla zwiększenia wydajności.
59
60 %package -n python3-Mako
61 Summary:        Templating system for Python
62 Summary(pl.UTF-8):      System szablonów dla języka Python
63 Group:          Libraries/Python
64 Requires:       python3-modules >= 1:3.3
65
66 %description -n python3-Mako
67 Mako is a template library written in Python. It provides a familiar,
68 non-XML syntax which compiles into Python modules for maximum
69 performance.
70
71 %description -n python3-Mako -l pl.UTF-8
72 Mako jest biblioteką szablonów napisaną w języku Python. Zapewnia
73 przyjazną, nie XML-ową składnię, która jest kompilowana do modułów
74 Pythona dla zwiększenia wydajności.
75
76 %package doc
77 Summary:        Documentation for Python Mako module
78 Summary(pl.UTF-8):      Dokumentacja do modułu Pythona Mako
79 Group:          Documentation
80
81 %description doc
82 Documentation for Python Mako module.
83
84 %description doc -l pl.UTF-8
85 Dokumentacja do modułu Pythona Mako.
86
87 %prep
88 %setup -q -n Mako-%{version}
89
90 %build
91 %if %{with python2}
92 %py_build
93
94 %if %{with tests}
95 %{__python} -m pytest test
96 %endif
97 %endif
98
99 %if %{with python3}
100 %py3_build
101
102 %if %{with tests}
103 %{__python3} -m pytest test
104 %endif
105 %endif
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
110
111 %if %{with python2}
112 %py_install
113
114 %{__mv} $RPM_BUILD_ROOT%{_bindir}/mako-render{,-2}
115
116 %py_postclean
117 %endif
118
119 %if %{with python3}
120 %py3_install
121
122 %{__mv} $RPM_BUILD_ROOT%{_bindir}/mako-render{,-3}
123 %endif
124
125 %if %{with python2}
126 ln -sf mako-render-2 $RPM_BUILD_ROOT%{_bindir}/mako-render
127 %endif
128
129 %clean
130 rm -rf $RPM_BUILD_ROOT
131
132 %if %{with python2}
133 %files
134 %defattr(644,root,root,755)
135 %doc AUTHORS CHANGES LICENSE README.rst
136 %attr(755,root,root) %{_bindir}/mako-render
137 %attr(755,root,root) %{_bindir}/mako-render-2
138 %{py_sitescriptdir}/mako
139 %{py_sitescriptdir}/Mako-%{version}-py*.egg-info
140 %{_examplesdir}/%{name}-%{version}
141 %endif
142
143 %if %{with python3}
144 %files -n python3-Mako
145 %defattr(644,root,root,755)
146 %doc CHANGES LICENSE README.rst
147 %attr(755,root,root) %{_bindir}/mako-render-3
148 %{py3_sitescriptdir}/mako
149 %{py3_sitescriptdir}/Mako-%{version}-py*.egg-info
150 %endif
151
152 %files doc
153 %defattr(644,root,root,755)
154 %doc doc/{_static,*.html,*.js}
This page took 0.906699 seconds and 3 git commands to generate.