]> git.pld-linux.org Git - packages/python-jinja2.git/blob - python-jinja2.spec
f1b17967800e2d9c9da7185bbd5414001130e5fc
[packages/python-jinja2.git] / python-jinja2.spec
1 %bcond_without  doc
2 %bcond_without  python2
3 %bcond_without  python3
4 %define module jinja2
5 Summary:        Template engine
6 Summary(pl.UTF-8):      Silnik szablonów
7 Name:           python-%{module}
8 Version:        2.6
9 Release:        1
10 License:        BSD
11 Group:          Development/Languages/Python
12 Source0:        http://pypi.python.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
13 # Source0-md5:  1c49a8825c993bfdcf55bb36897d28a2
14 URL:            http://jinja.pocoo.org/
15 BuildRequires:  rpm-pythonprov
16 %if %{with python2}
17 BuildRequires:  python-devel
18 BuildRequires:  python-setuptools
19 %pyrequires_eq  python-modules
20 %endif
21 %if %{with python3}
22 BuildRequires:  python3-devel
23 BuildRequires:  python3-distribute
24 BuildRequires:  python3-modules
25 %endif
26 %if %{with doc}
27 BuildRequires:  sphinx-pdg
28 %endif
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 A small but fast and easy to use stand-alone template engine written
33 in pure python. Provides a Django inspired non-XML syntax but supports
34 inline expressions and an optional sandboxed environment.
35
36 %description -l pl.UTF-8
37 Mały ale szybkie i łatwy w użyciu samodzielny silnik szablonów
38 napisany w czystym Pythonie. Dostarcza podobne do Django, o odmiennej
39 od XMLa składni i kompliowane do kodu Pythona szablony w opcjonalnie
40 ograniczonym środowisku.
41
42 %package -n python3-%{module}
43 Summary:        Template engine
44 Summary(pl.UTF-8):      Silnik szablonów
45 Group:          Development/Languages/Python
46 %if %{with python3}
47 %pyrequires_eq  python3-modules
48 %endif
49
50 %description -n python3-%{module}
51 A small but fast and easy to use stand-alone template engine written
52 in pure python. Provides a Django inspired non-XML syntax but supports
53 inline expressions and an optional sandboxed environment.
54
55 %description -n python3-%{module} -l pl.UTF-8
56 Mały ale szybkie i łatwy w użyciu samodzielny silnik szablonów
57 napisany w czystym Pythonie. Dostarcza podobne do Django, o odmiennej
58 od XMLa składni i kompliowane do kodu Pythona szablony w opcjonalnie
59 ograniczonym środowisku.
60
61 %package apidoc
62 Summary:        Jinja2 template engine API documentation
63 Group:          Development/Languages/Python
64
65 %description apidoc
66 API documentation for Jinja2 template engine
67
68 %prep
69 %setup -q -n Jinja2-%{version}
70
71 %build
72 %if %{with python2}
73 %{__python} setup.py build --build-base py2
74 %endif
75 %if %{with python3}
76 %{__python3} setup.py build --build-base py3
77 %endif
78
79 %if %{with doc}
80 cd docs
81 %{__make} -j1 html
82 rm -rf _build/html/_sources
83 %endif
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87
88 %if %{with python2}
89 %{__python} setup.py \
90         build --build-base py2 \
91         install \
92         --root=$RPM_BUILD_ROOT \
93         --optimize=2
94
95 %py_postclean
96 %endif
97
98 %if %{with python3}
99 %{__python3} setup.py \
100         build --build-base py3 \
101         install \
102         --root=$RPM_BUILD_ROOT \
103         --optimize=2
104 %endif
105
106 %clean
107 rm -rf $RPM_BUILD_ROOT
108
109 %if %{with python2}
110 %files
111 %defattr(644,root,root,755)
112 %doc PKG-INFO AUTHORS CHANGES
113 %{py_sitescriptdir}/%{module}
114 %{py_sitescriptdir}/*Jinja*.egg*
115 %endif
116
117 %if %{with python3}
118 %files -n python3-%{module}
119 %defattr(644,root,root,755)
120 %doc PKG-INFO AUTHORS CHANGES
121 %{py3_sitescriptdir}/%{module}
122 %{py3_sitescriptdir}/*Jinja*.egg*
123 %endif
124
125 %if %{with doc}
126 %files apidoc
127 %defattr(644,root,root,755)
128 %doc docs/_build/html
129 %endif
This page took 0.063692 seconds and 2 git commands to generate.