%bcond_with dotests %global __tar /opt/freeware/bin/tar %global py_minor 16 %global py_major 3.9 %global python_major python%{py_major} %global pkgname jinja2 %global meta_package python3-%{pkgname} %global python3_sitearch %(%{python_major} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(0))") Name: %{python_major}-%{pkgname} Version: 2.10.3 Release: 2 Summary: General purpose template engine for python2 License: BSD URL: https://pypi.python.org/pypi/%{pkgname} Source0: https://files.pythonhosted.org/packages/source/j/%{pkgname}/Jinja2-%{version}.tar.gz BuildArch: noarch BuildRequires: %{python_major}-devel >= %{py_major}.%{py_minor} BuildRequires: %{python_major}-setuptools >= 65.2.0 Requires: %{python_major} >= %{py_major}.%{py_minor} Requires: python3.9-markupsafe >= 1.1.1 %description 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. If you have any exposure to other text-based template languages, such as Smarty or Django, you should feel right at home with Jinja2. It's both designer and developer friendly by sticking to Python's principles and adding functionality useful for templating environments. %package -n %{meta_package} Summary: Meta-package for %{name} Requires: python3 >= %{py_major}.%{py_minor} Requires: %{name} = %{version}-%{release} %description -n %{meta_package} This is a Meta-package for %{name} package. %prep %autosetup -n Jinja2-%{version} %build export PATH=/opt/freeware/bin:$PATH %{python_major} setup.py build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %{python_major} setup.py install --root %{buildroot} %check %if %{with dotests} #python3 -m venv python_venv #. ./python_venv/bin/activate #pip3 install pytest #pip3 install hypothesis #ulimit -d unlimited #ulimit -n unlimited #ulimit -m unlimited # ulimit -f unlimited #( python runtests.py -m 'full' -v || true ) #deactivate %endif %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %license LICENSE.rst %doc CHANGES.rst %if 0%{?with_docs} %doc html %endif # with_docs %doc ext %doc examples %{python3_sitearch}/* %files -n %{meta_package} %defattr(-,root,system,-) %changelog * Mon Jan 16 2023 Sangeetha Bandi - 2.10.3-2 - Jinja2 for python3.9 * Thu Nov 14 2019 Baanu Tumma 2.10.3-1 - Update to latest version, built using python3 * Tue Jun 18 2019 Baanu Tumma - 2.10.1-1 - Update to 2.10.1 ( fixed CVE-2016-10745 CVE-2019-10906 ) * Wed May 24 2017 Michael Wilson - 2.9.6-1 - Update to 2.9.6 * Tue Jul 16 2013 Tristan Delhalle - 2.7-1 - - first version for AIX V6.1 and higher