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