]> git.pld-linux.org Git - packages/python-jinja2.git/blob - python-jinja2.spec
2c83dedbf2cb51a76e40f730a9a7a129d0f9da3e
[packages/python-jinja2.git] / python-jinja2.spec
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
6
7 %define         module  jinja2
8 Summary:        Jinja2 Template engine for Python 2.x
9 Summary(pl.UTF-8):      Silnik szablonów Jinja2 dla Pythona 2.x
10 Name:           python-%{module}
11 Version:        2.10
12 Release:        1
13 License:        BSD
14 Group:          Development/Languages/Python
15 #Source0Download: https://pypi.org/simple/Jinja2
16 Source0:        https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
17 # Source0-md5:  61ef1117f945486472850819b8d1eb3d
18 URL:            http://jinja.pocoo.org/
19 BuildRequires:  rpmbuild(macros) >= 1.714
20 BuildRequires:  rpm-pythonprov
21 %if %{with python2}
22 BuildRequires:  python-devel >= 1:2.6
23 BuildRequires:  python-setuptools
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-devel >= 1:3.3
27 BuildRequires:  python3-modules >= 1:3.3
28 BuildRequires:  python3-setuptools
29 %endif
30 %if %{with doc}
31 BuildRequires:  sphinx-pdg
32 %endif
33 Requires:       python-markupsafe
34 Requires:       python-modules >= 1:2.6
35 Obsoletes:      python-Jinja2
36 BuildArch:      noarch
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
41 in pure Python. Provides a Django inspired non-XML syntax but supports
42 inline expressions and an optional sandboxed environment.
43
44 %description -l pl.UTF-8
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
48 ograniczonym środowisku.
49
50 %package -n python3-%{module}
51 Summary:        Template engine Jinja2 for Python 3.x
52 Summary(pl.UTF-8):      Silnik szablonów Jinja2 dla Pythona 3.x
53 Group:          Development/Languages/Python
54 Requires:       python3-markupsafe
55 Requires:       python3-modules >= 1:3.3
56
57 %description -n python3-%{module}
58 A small but fast and easy to use stand-alone template engine written
59 in pure Python. Provides a Django inspired non-XML syntax but supports
60 inline expressions and an optional sandboxed environment.
61
62 %description -n python3-%{module} -l pl.UTF-8
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
66 ograniczonym środowisku.
67
68 %package apidoc
69 Summary:        Jinja2 template engine API documentation
70 Summary(pl.UTF-8):      Dokumentacja API silnika szablonów Jinja2
71 Group:          Development/Languages/Python
72
73 %description apidoc
74 API documentation for Jinja2 template engine.
75
76 %description apidoc -l pl.UTF-8
77 Dokumentacja API silnika szablonów Jinja2.
78
79 %prep
80 %setup -q -n Jinja2-%{version}
81
82 %build
83 %if %{with python2}
84 %py_build
85 %endif
86 %if %{with python3}
87 %py3_build
88 %endif
89
90 %if %{with doc}
91 PYTHONPATH=$(pwd) \
92 %{__make} -C docs -j1 html \
93         SPHINXBUILD=sphinx-build
94 %endif
95
96 %install
97 rm -rf $RPM_BUILD_ROOT
98
99 %if %{with python2}
100 %py_install
101
102 %py_postclean
103 %endif
104
105 %if %{with python3}
106 %py3_install
107 %endif
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %if %{with python2}
113 %files
114 %defattr(644,root,root,755)
115 %doc AUTHORS CHANGES.rst LICENSE README.rst
116 %{py_sitescriptdir}/%{module}
117 %{py_sitescriptdir}/Jinja2-%{version}-py*.egg-info
118 %endif
119
120 %if %{with python3}
121 %files -n python3-%{module}
122 %defattr(644,root,root,755)
123 %doc AUTHORS CHANGES.rst LICENSE README.rst
124 %{py3_sitescriptdir}/%{module}
125 %{py3_sitescriptdir}/Jinja2-%{version}-py*.egg-info
126 %endif
127
128 %if %{with doc}
129 %files apidoc
130 %defattr(644,root,root,755)
131 %doc docs/_build/html/{_static,*.html,*.js}
132 %endif
This page took 0.108124 seconds and 3 git commands to generate.