]>
Commit | Line | Data |
---|---|---|
bd8c7cd4 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # API documentation | |
4 | %bcond_without python2 # Python 2.x modules | |
5 | %bcond_without python3 # Python 3.x modules | |
22da3d42 ER |
6 | |
7 | %define module jinja2 | |
bd8c7cd4 JB |
8 | Summary: Jinja2 Template engine for Python 2.x |
9 | Summary(pl.UTF-8): Silnik szablonów Jinja2 dla Pythona 2.x | |
32bc8461 | 10 | Name: python-%{module} |
1137328c JB |
11 | Version: 2.8 |
12 | Release: 1 | |
32bc8461 MK |
13 | License: BSD |
14 | Group: Development/Languages/Python | |
716e4027 | 15 | Source0: https://pypi.python.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz |
1137328c | 16 | # Source0-md5: edb51693fe22c53cee5403775c71a99e |
63775cd9 | 17 | URL: http://jinja.pocoo.org/ |
7b453666 | 18 | BuildRequires: rpmbuild(macros) >= 1.710 |
196bf8af | 19 | BuildRequires: rpm-pythonprov |
63775cd9 | 20 | %if %{with python2} |
1137328c | 21 | BuildRequires: python-devel >= 1:2.6 |
de2c695c | 22 | BuildRequires: python-setuptools |
63775cd9 AF |
23 | %endif |
24 | %if %{with python3} | |
1137328c JB |
25 | BuildRequires: python3-devel >= 1:3.3 |
26 | BuildRequires: python3-modules >= 1:3.3 | |
f1a9449f | 27 | BuildRequires: python3-setuptools |
63775cd9 | 28 | %endif |
bb2732e3 AF |
29 | %if %{with doc} |
30 | BuildRequires: sphinx-pdg | |
31 | %endif | |
36ef4e1f | 32 | Requires: python-markupsafe |
1137328c | 33 | Requires: python-modules >= 1:2.6 |
22da3d42 | 34 | BuildArch: noarch |
32bc8461 MK |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
36 | ||
37 | %description | |
38 | A small but fast and easy to use stand-alone template engine written | |
bd8c7cd4 | 39 | in pure Python. Provides a Django inspired non-XML syntax but supports |
32bc8461 MK |
40 | inline expressions and an optional sandboxed environment. |
41 | ||
32bc8461 | 42 | %description -l pl.UTF-8 |
bd8c7cd4 JB |
43 | Mały ale szybki i łatwy w użyciu samodzielny silnik szablonów napisany |
44 | w czystym Pythonie. Udostępnia podobne do Django, o odmiennej od XML-a | |
45 | składni i kompilowane do kodu Pythona szablony w opcjonalnie | |
32bc8461 MK |
46 | ograniczonym środowisku. |
47 | ||
63775cd9 | 48 | %package -n python3-%{module} |
bd8c7cd4 | 49 | Summary: Template engine Jinja2 for Python 3.x |
22da3d42 ER |
50 | Summary(pl.UTF-8): Silnik szablonów Jinja2 dla Pythona 3.x |
51 | Group: Development/Languages/Python | |
36ef4e1f | 52 | Requires: python3-markupsafe |
1137328c | 53 | Requires: python3-modules >= 1:3.3 |
63775cd9 | 54 | |
5742e286 | 55 | %description -n python3-%{module} |
63775cd9 | 56 | A small but fast and easy to use stand-alone template engine written |
bd8c7cd4 | 57 | in pure Python. Provides a Django inspired non-XML syntax but supports |
63775cd9 AF |
58 | inline expressions and an optional sandboxed environment. |
59 | ||
60 | %description -n python3-%{module} -l pl.UTF-8 | |
bd8c7cd4 JB |
61 | Mały ale szybki i łatwy w użyciu samodzielny silnik szablonów napisany |
62 | w czystym Pythonie. Udostępnia podobne do Django, o odmiennej od XML-a | |
63 | składni i kompilowane do kodu Pythona szablony w opcjonalnie | |
63775cd9 AF |
64 | ograniczonym środowisku. |
65 | ||
66 | %package apidoc | |
67 | Summary: Jinja2 template engine API documentation | |
bd8c7cd4 | 68 | Summary(pl.UTF-8): Dokumentacja API silnika szablonów Jinja2 |
22da3d42 | 69 | Group: Development/Languages/Python |
63775cd9 AF |
70 | |
71 | %description apidoc | |
bd8c7cd4 JB |
72 | API documentation for Jinja2 template engine. |
73 | ||
74 | %description apidoc -l pl.UTF-8 | |
75 | Dokumentacja API silnika szablonów Jinja2. | |
63775cd9 | 76 | |
32bc8461 MK |
77 | %prep |
78 | %setup -q -n Jinja2-%{version} | |
79 | ||
80 | %build | |
63775cd9 | 81 | %if %{with python2} |
d831097c | 82 | %py_build |
63775cd9 AF |
83 | %endif |
84 | %if %{with python3} | |
d831097c | 85 | %py3_build |
63775cd9 AF |
86 | %endif |
87 | ||
bb2732e3 AF |
88 | %if %{with doc} |
89 | cd docs | |
8fb54c68 | 90 | %{__make} -j1 html |
1137328c | 91 | %{__rm} -r _build/html/_sources |
bb2732e3 | 92 | %endif |
32bc8461 MK |
93 | |
94 | %install | |
95 | rm -rf $RPM_BUILD_ROOT | |
96 | ||
63775cd9 | 97 | %if %{with python2} |
d831097c | 98 | %py_install |
32bc8461 MK |
99 | |
100 | %py_postclean | |
63775cd9 AF |
101 | %endif |
102 | ||
103 | %if %{with python3} | |
d831097c | 104 | %py3_install |
63775cd9 | 105 | %endif |
32bc8461 MK |
106 | |
107 | %clean | |
108 | rm -rf $RPM_BUILD_ROOT | |
109 | ||
63775cd9 | 110 | %if %{with python2} |
32bc8461 MK |
111 | %files |
112 | %defattr(644,root,root,755) | |
22da3d42 | 113 | %doc AUTHORS CHANGES LICENSE |
63775cd9 | 114 | %{py_sitescriptdir}/%{module} |
bd8c7cd4 | 115 | %{py_sitescriptdir}/Jinja2-%{version}-py*.egg-info |
63775cd9 AF |
116 | %endif |
117 | ||
118 | %if %{with python3} | |
119 | %files -n python3-%{module} | |
120 | %defattr(644,root,root,755) | |
22da3d42 | 121 | %doc AUTHORS CHANGES LICENSE |
63775cd9 | 122 | %{py3_sitescriptdir}/%{module} |
bd8c7cd4 | 123 | %{py3_sitescriptdir}/Jinja2-%{version}-py*.egg-info |
63775cd9 AF |
124 | %endif |
125 | ||
bb2732e3 | 126 | %if %{with doc} |
63775cd9 AF |
127 | %files apidoc |
128 | %defattr(644,root,root,755) | |
22da3d42 | 129 | %doc docs/_build/html/* |
bb2732e3 | 130 | %endif |