#
# Conditional build:
%bcond_without doc # API documentation
+%bcond_without tests # unit tests
%bcond_without python2 # Python 2.x modules
%bcond_without python3 # Python 3.x modules
Summary: Jinja2 Template engine for Python 2.x
Summary(pl.UTF-8): Silnik szablonów Jinja2 dla Pythona 2.x
Name: python-%{module}
-Version: 2.10
-Release: 3
+Version: 2.10.3
+Release: 1
License: BSD
Group: Development/Languages/Python
#Source0Download: https://pypi.org/simple/Jinja2
Source0: https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
-# Source0-md5: 61ef1117f945486472850819b8d1eb3d
+# Source0-md5: 7883559bc5cc3e2781d94b4be61cfdcd
URL: http://jinja.pocoo.org/
BuildRequires: rpmbuild(macros) >= 1.714
BuildRequires: rpm-pythonprov
%if %{with python2}
-BuildRequires: python-devel >= 1:2.6
+BuildRequires: python-devel >= 1:2.7
BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-markupsafe >= 0.23
+BuildRequires: python-pytest
+%endif
%endif
%if %{with python3}
-BuildRequires: python3-devel >= 1:3.3
-BuildRequires: python3-modules >= 1:3.3
+BuildRequires: python3-devel >= 1:3.5
+BuildRequires: python3-modules >= 1:3.5
BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-markupsafe >= 0.23
+BuildRequires: python3-pytest
+%endif
%endif
%if %{with doc}
BuildRequires: sphinx-pdg
%endif
-Requires: python-markupsafe
-Requires: python-modules >= 1:2.6
+Requires: python-modules >= 1:2.7
Obsoletes: python-Jinja2
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Summary: Template engine Jinja2 for Python 3.x
Summary(pl.UTF-8): Silnik szablonów Jinja2 dla Pythona 3.x
Group: Development/Languages/Python
-Requires: python3-markupsafe
-Requires: python3-modules >= 1:3.3
+Requires: python3-modules >= 1:3.5
%description -n python3-%{module}
A small but fast and easy to use stand-alone template engine written
%build
%if %{with python2}
%py_build
+
+%if %{with tests}
+%{__python} -m pytest tests
+%endif
%endif
+
%if %{with python3}
%py3_build
+
+%if %{with tests}
+%{__python3} -m pytest tests
+%endif
%endif
%if %{with doc}
%if %{with python2}
%files
%defattr(644,root,root,755)
-%doc AUTHORS CHANGES.rst LICENSE README.rst
+%doc CHANGES.rst LICENSE.rst README.rst
%{py_sitescriptdir}/%{module}
%{py_sitescriptdir}/Jinja2-%{version}-py*.egg-info
%endif
%if %{with python3}
%files -n python3-%{module}
%defattr(644,root,root,755)
-%doc AUTHORS CHANGES.rst LICENSE README.rst
+%doc CHANGES.rst LICENSE.rst README.rst
%{py3_sitescriptdir}/%{module}
%{py3_sitescriptdir}/Jinja2-%{version}-py*.egg-info
%endif