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