%define scl rh-python36 %{?scl:%scl_package %{name}} %{!?scl:%global pkg_name %{name}} %define name python-jinja2 %define version 2.11.1 %define unmangled_version 2.11.1 %define unmangled_version 2.11.1 %define release 1 Summary: A small but fast and easy to use stand-alone template engine written in pure python. %{?scl:Requires: %{scl}-runtime} %{?scl:BuildRequires: %{scl}-runtime} Name: %{?scl_prefix}python-jinja2 Version: %{version} Release: %{release} Source0: Jinja2-%{unmangled_version}.tar.gz License: BSD Group: Development/Libraries BuildRoot: %{_tmppath}/Jinja2-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch Vendor: Armin Ronacher Packager: Martin Juhl Url: http://jinja.pocoo.org/ %description Jinja2 ~~~~~~ Jinja2 is a template engine written in pure Python. It provides a `Django`_ inspired non-XML syntax but supports inline expressions and an optional `sandboxed`_ environment. Nutshell -------- Here a small example of a Jinja template:: {% extends 'base.html' %} {% block title %}Memberlist{% endblock %} {% block content %} {% endblock %} Philosophy ---------- Application logic is for the controller but don't try to make the life for the template designer too hard by giving him too few functionality. For more informations visit the new `Jinja2 webpage`_ and `documentation`_. .. _sandboxed: https://en.wikipedia.org/wiki/Sandbox_(computer_security) .. _Django: https://www.djangoproject.com/ .. _Jinja2 webpage: http://jinja.pocoo.org/ .. _documentation: http://jinja.pocoo.org/2/documentation/ %prep %{?scl:scl enable %{scl} - << \EOF} set -ex %setup -n Jinja2-%{unmangled_version} -n Jinja2-%{unmangled_version} %{?scl:EOF} %build %{?scl:scl enable %{scl} - << \EOF} set -ex python3 setup.py build %{?scl:EOF} %install %{?scl:scl enable %{scl} - << \EOF} set -ex python3 setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES %{?scl:EOF} %clean %{?scl:scl enable %{scl} - << \EOF} set -ex rm -rf $RPM_BUILD_ROOT %{?scl:EOF} %files -f INSTALLED_FILES %defattr(-,root,root)