Build only Python3
[packages/python3-jinja2.git] / python3-jinja2.spec
CommitLineData
49a8d543
ER
1#
2# Conditional build:
3%bcond_without doc # API documentation
4%bcond_without tests # unit tests
49a8d543
ER
5
6%define module jinja2
36aca28e
ER
7Summary: Template engine Jinja2 for Python 3.x
8Summary(pl.UTF-8): Silnik szablonów Jinja2 dla Pythona 3.x
9Name: python3-%{module}
49a8d543
ER
10Version: 2.11.3
11Release: 1
e6068581
ER
12License: BSD
13Group: Development/Languages/Python
49a8d543
ER
14#Source0Download: https://pypi.org/simple/Jinja2
15Source0: https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
16# Source0-md5: 231dc00d34afb2672c497713fa9cdaaa
17URL: http://jinja.pocoo.org/
18BuildRequires: rpmbuild(macros) >= 1.714
e6068581 19BuildRequires: rpm-pythonprov
49a8d543
ER
20BuildRequires: python3-devel >= 1:3.5
21BuildRequires: python3-modules >= 1:3.5
22BuildRequires: python3-setuptools
23%if %{with tests}
24BuildRequires: python3-markupsafe >= 0.23
25BuildRequires: python3-pytest
26%endif
e6068581 27%if %{with doc}
49a8d543
ER
28BuildRequires: python3-pallets-sphinx-themes >= 1.2.0
29BuildRequires: python3-sphinxcontrib-log-cabinet >= 1.0.1
30BuildRequires: python3-sphinx_issues >= 1.2.0
31BuildRequires: sphinx-pdg-3 >= 2.1.2
e6068581 32%endif
49a8d543 33BuildArch: noarch
36aca28e 34Requires: python3-modules >= 1:3.5
e6068581
ER
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37%description
38A small but fast and easy to use stand-alone template engine written
49a8d543 39in pure Python. Provides a Django inspired non-XML syntax but supports
e6068581
ER
40inline expressions and an optional sandboxed environment.
41
e6068581 42%description -l pl.UTF-8
49a8d543
ER
43Mały ale szybki i łatwy w użyciu samodzielny silnik szablonów napisany
44w czystym Pythonie. Udostępnia podobne do Django, o odmiennej od XML-a
45składni i kompilowane do kodu Pythona szablony w opcjonalnie
46ograniczonym środowisku.
47
49a8d543
ER
48%package apidoc
49Summary: Jinja2 template engine API documentation
50Summary(pl.UTF-8): Dokumentacja API silnika szablonów Jinja2
51Group: Development/Languages/Python
52
53%description apidoc
54API documentation for Jinja2 template engine.
55
56%description apidoc -l pl.UTF-8
57Dokumentacja API silnika szablonów Jinja2.
58
e6068581
ER
59%prep
60%setup -q -n Jinja2-%{version}
61
62%build
49a8d543
ER
63%py3_build
64
65%if %{with tests}
66PYTHONPATH=$(pwd)/src \
67%{__python3} -m pytest tests
68%endif
49a8d543 69
e6068581 70%if %{with doc}
49a8d543
ER
71PYTHONPATH=$(pwd) \
72%{__make} -C docs -j1 html \
73 SPHINXBUILD=sphinx-build-3
e6068581
ER
74%endif
75
76%install
77rm -rf $RPM_BUILD_ROOT
49a8d543 78%py3_install
e6068581
ER
79
80%clean
81rm -rf $RPM_BUILD_ROOT
82
83%files
84%defattr(644,root,root,755)
49a8d543 85%doc CHANGES.rst LICENSE.rst README.rst
e6068581 86%{py3_sitescriptdir}/%{module}
49a8d543 87%{py3_sitescriptdir}/Jinja2-%{version}-py*.egg-info
49a8d543
ER
88
89%if %{with doc}
90%files apidoc
91%defattr(644,root,root,755)
92%doc docs/_build/html/{_static,*.html,*.js}
93%endif
This page took 0.087951 seconds and 4 git commands to generate.