]>
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 |
224d34db | 34 | Obsoletes: python-Jinja2 |
22da3d42 | 35 | BuildArch: noarch |
32bc8461 MK |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
37 | ||
38 | %description | |
39 | A small but fast and easy to use stand-alone template engine written | |
bd8c7cd4 | 40 | in pure Python. Provides a Django inspired non-XML syntax but supports |
32bc8461 MK |
41 | inline expressions and an optional sandboxed environment. |
42 | ||
32bc8461 | 43 | %description -l pl.UTF-8 |
bd8c7cd4 JB |
44 | Mały ale szybki i łatwy w użyciu samodzielny silnik szablonów napisany |
45 | w czystym Pythonie. Udostępnia podobne do Django, o odmiennej od XML-a | |
46 | składni i kompilowane do kodu Pythona szablony w opcjonalnie | |
32bc8461 MK |
47 | ograniczonym środowisku. |
48 | ||
63775cd9 | 49 | %package -n python3-%{module} |
bd8c7cd4 | 50 | Summary: Template engine Jinja2 for Python 3.x |
22da3d42 ER |
51 | Summary(pl.UTF-8): Silnik szablonów Jinja2 dla Pythona 3.x |
52 | Group: Development/Languages/Python | |
36ef4e1f | 53 | Requires: python3-markupsafe |
1137328c | 54 | Requires: python3-modules >= 1:3.3 |
63775cd9 | 55 | |
5742e286 | 56 | %description -n python3-%{module} |
63775cd9 | 57 | A small but fast and easy to use stand-alone template engine written |
bd8c7cd4 | 58 | in pure Python. Provides a Django inspired non-XML syntax but supports |
63775cd9 AF |
59 | inline expressions and an optional sandboxed environment. |
60 | ||
61 | %description -n python3-%{module} -l pl.UTF-8 | |
bd8c7cd4 JB |
62 | Mały ale szybki i łatwy w użyciu samodzielny silnik szablonów napisany |
63 | w czystym Pythonie. Udostępnia podobne do Django, o odmiennej od XML-a | |
64 | składni i kompilowane do kodu Pythona szablony w opcjonalnie | |
63775cd9 AF |
65 | ograniczonym środowisku. |
66 | ||
67 | %package apidoc | |
68 | Summary: Jinja2 template engine API documentation | |
bd8c7cd4 | 69 | Summary(pl.UTF-8): Dokumentacja API silnika szablonów Jinja2 |
22da3d42 | 70 | Group: Development/Languages/Python |
63775cd9 AF |
71 | |
72 | %description apidoc | |
bd8c7cd4 JB |
73 | API documentation for Jinja2 template engine. |
74 | ||
75 | %description apidoc -l pl.UTF-8 | |
76 | Dokumentacja API silnika szablonów Jinja2. | |
63775cd9 | 77 | |
32bc8461 MK |
78 | %prep |
79 | %setup -q -n Jinja2-%{version} | |
80 | ||
81 | %build | |
63775cd9 | 82 | %if %{with python2} |
d831097c | 83 | %py_build |
63775cd9 AF |
84 | %endif |
85 | %if %{with python3} | |
d831097c | 86 | %py3_build |
63775cd9 AF |
87 | %endif |
88 | ||
bb2732e3 AF |
89 | %if %{with doc} |
90 | cd docs | |
8fb54c68 | 91 | %{__make} -j1 html |
1137328c | 92 | %{__rm} -r _build/html/_sources |
bb2732e3 | 93 | %endif |
32bc8461 MK |
94 | |
95 | %install | |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
63775cd9 | 98 | %if %{with python2} |
d831097c | 99 | %py_install |
32bc8461 MK |
100 | |
101 | %py_postclean | |
63775cd9 AF |
102 | %endif |
103 | ||
104 | %if %{with python3} | |
d831097c | 105 | %py3_install |
63775cd9 | 106 | %endif |
32bc8461 MK |
107 | |
108 | %clean | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
63775cd9 | 111 | %if %{with python2} |
32bc8461 MK |
112 | %files |
113 | %defattr(644,root,root,755) | |
22da3d42 | 114 | %doc AUTHORS CHANGES LICENSE |
63775cd9 | 115 | %{py_sitescriptdir}/%{module} |
bd8c7cd4 | 116 | %{py_sitescriptdir}/Jinja2-%{version}-py*.egg-info |
63775cd9 AF |
117 | %endif |
118 | ||
119 | %if %{with python3} | |
120 | %files -n python3-%{module} | |
121 | %defattr(644,root,root,755) | |
22da3d42 | 122 | %doc AUTHORS CHANGES LICENSE |
63775cd9 | 123 | %{py3_sitescriptdir}/%{module} |
bd8c7cd4 | 124 | %{py3_sitescriptdir}/Jinja2-%{version}-py*.egg-info |
63775cd9 AF |
125 | %endif |
126 | ||
bb2732e3 | 127 | %if %{with doc} |
63775cd9 AF |
128 | %files apidoc |
129 | %defattr(644,root,root,755) | |
22da3d42 | 130 | %doc docs/_build/html/* |
bb2732e3 | 131 | %endif |