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