]> git.pld-linux.org Git - packages/python3-jinja2.git/blob - python3-jinja2.spec
b3ccb45c84ca29a4812abc6faac2d98d33e10cf0
[packages/python3-jinja2.git] / python3-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.11.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:  231dc00d34afb2672c497713fa9cdaaa
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:  python3-pallets-sphinx-themes >= 1.2.0
41 BuildRequires:  python3-sphinxcontrib-log-cabinet >= 1.0.1
42 BuildRequires:  python3-sphinx_issues >= 1.2.0
43 BuildRequires:  sphinx-pdg-3 >= 2.1.2
44 %endif
45 Requires:       python-modules >= 1:2.7
46 Obsoletes:      python-Jinja2
47 BuildArch:      noarch
48 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50 %description
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 -l pl.UTF-8
56 Mały ale szybki i łatwy w użyciu samodzielny silnik szablonów napisany
57 w czystym Pythonie. Udostępnia podobne do Django, o odmiennej od XML-a
58 składni i kompilowane do kodu Pythona szablony w opcjonalnie
59 ograniczonym środowisku.
60
61 %package -n python3-%{module}
62 Summary:        Template engine Jinja2 for Python 3.x
63 Summary(pl.UTF-8):      Silnik szablonów Jinja2 dla Pythona 3.x
64 Group:          Development/Languages/Python
65 Requires:       python3-modules >= 1:3.5
66
67 %description -n python3-%{module}
68 A small but fast and easy to use stand-alone template engine written
69 in pure Python. Provides a Django inspired non-XML syntax but supports
70 inline expressions and an optional sandboxed environment.
71
72 %description -n python3-%{module} -l pl.UTF-8
73 Mały ale szybki i łatwy w użyciu samodzielny silnik szablonów napisany
74 w czystym Pythonie. Udostępnia podobne do Django, o odmiennej od XML-a
75 składni i kompilowane do kodu Pythona szablony w opcjonalnie
76 ograniczonym środowisku.
77
78 %package apidoc
79 Summary:        Jinja2 template engine API documentation
80 Summary(pl.UTF-8):      Dokumentacja API silnika szablonów Jinja2
81 Group:          Development/Languages/Python
82
83 %description apidoc
84 API documentation for Jinja2 template engine.
85
86 %description apidoc -l pl.UTF-8
87 Dokumentacja API silnika szablonów Jinja2.
88
89 %prep
90 %setup -q -n Jinja2-%{version}
91
92 %build
93 %if %{with python2}
94 %py_build
95
96 %if %{with tests}
97 PYTHONPATH=$(pwd)/src \
98 %{__python} -m pytest tests
99 %endif
100 %endif
101
102 %if %{with python3}
103 %py3_build
104
105 %if %{with tests}
106 PYTHONPATH=$(pwd)/src \
107 %{__python3} -m pytest tests
108 %endif
109 %endif
110
111 %if %{with doc}
112 PYTHONPATH=$(pwd) \
113 %{__make} -C docs -j1 html \
114         SPHINXBUILD=sphinx-build-3
115 %endif
116
117 %install
118 rm -rf $RPM_BUILD_ROOT
119
120 %if %{with python2}
121 %py_install
122
123 %py_postclean
124 %endif
125
126 %if %{with python3}
127 %py3_install
128 %endif
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %if %{with python2}
134 %files
135 %defattr(644,root,root,755)
136 %doc CHANGES.rst LICENSE.rst README.rst
137 %{py_sitescriptdir}/%{module}
138 %{py_sitescriptdir}/Jinja2-%{version}-py*.egg-info
139 %endif
140
141 %if %{with python3}
142 %files -n python3-%{module}
143 %defattr(644,root,root,755)
144 %doc CHANGES.rst LICENSE.rst README.rst
145 %{py3_sitescriptdir}/%{module}
146 %{py3_sitescriptdir}/Jinja2-%{version}-py*.egg-info
147 %endif
148
149 %if %{with doc}
150 %files apidoc
151 %defattr(644,root,root,755)
152 %doc docs/_build/html/{_static,*.html,*.js}
153 %endif
This page took 0.136438 seconds and 2 git commands to generate.