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