Build only Python3
[packages/python3-jinja2.git] / python3-jinja2.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without doc # API documentation
4%bcond_without tests # unit tests
5
6%define module jinja2
7Summary: Template engine Jinja2 for Python 3.x
8Summary(pl.UTF-8): Silnik szablonów Jinja2 dla Pythona 3.x
9Name: python3-%{module}
10Version: 2.11.3
11Release: 1
12License: BSD
13Group: Development/Languages/Python
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
19BuildRequires: rpm-pythonprov
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
27%if %{with doc}
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
32%endif
33BuildArch: noarch
34Requires: python3-modules >= 1:3.5
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37%description
38A small but fast and easy to use stand-alone template engine written
39in pure Python. Provides a Django inspired non-XML syntax but supports
40inline expressions and an optional sandboxed environment.
41
42%description -l pl.UTF-8
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
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
59%prep
60%setup -q -n Jinja2-%{version}
61
62%build
63%py3_build
64
65%if %{with tests}
66PYTHONPATH=$(pwd)/src \
67%{__python3} -m pytest tests
68%endif
69
70%if %{with doc}
71PYTHONPATH=$(pwd) \
72%{__make} -C docs -j1 html \
73 SPHINXBUILD=sphinx-build-3
74%endif
75
76%install
77rm -rf $RPM_BUILD_ROOT
78%py3_install
79
80%clean
81rm -rf $RPM_BUILD_ROOT
82
83%files
84%defattr(644,root,root,755)
85%doc CHANGES.rst LICENSE.rst README.rst
86%{py3_sitescriptdir}/%{module}
87%{py3_sitescriptdir}/Jinja2-%{version}-py*.egg-info
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.04211 seconds and 4 git commands to generate.