b2e771
%global srcname Jinja2
b2e771
b2e771
Name:           python-jinja2
b2e771
Version:        2.10.3
b2e771
Release:        4%{?dist}
b2e771
Summary:        General purpose template engine
b2e771
License:        BSD
b2e771
URL:            http://jinja.pocoo.org/
b2e771
Source0:        %{pypi_source}
b2e771
b2e771
%if 0%{?fedora} || 0%{?rhel} > 7
b2e771
# Enable python3 build by default
b2e771
%bcond_without python3
b2e771
%else
b2e771
%bcond_with python3
b2e771
%endif
b2e771
b2e771
%if 0%{?rhel} > 7
b2e771
# Disable python2 build by default
b2e771
%bcond_with python2
b2e771
%else
b2e771
%bcond_without python2
b2e771
%endif
b2e771
b2e771
# Enable building without docs to avoid a circular dependency between this
b2e771
# and python-sphinx:
b2e771
%bcond_with docs
b2e771
b2e771
%if 0%{?fedora} || 0%{?rhel} > 7
b2e771
%bcond_without async
b2e771
%else
b2e771
%bcond_with async
b2e771
%endif
b2e771
b2e771
BuildArch:      noarch
b2e771
# Exclude i686 arch. Due to a modularity issue it's being added to the
b2e771
# x86_64 compose of CRB, but we don't want to ship it at all.
b2e771
# See: https://projects.engineering.redhat.com/browse/RCM-72605
b2e771
ExcludeArch:    i686
b2e771
b2e771
%description
b2e771
Jinja2 is a template engine written in pure Python.  It provides a
b2e771
Django inspired non-XML syntax but supports inline expressions and an
b2e771
optional sandboxed environment.
b2e771
b2e771
If you have any exposure to other text-based template languages, such
b2e771
as Smarty or Django, you should feel right at home with Jinja2. It's
b2e771
both designer and developer friendly by sticking to Python's
b2e771
principles and adding functionality useful for templating
b2e771
environments.
b2e771
b2e771
b2e771
%if %{with python2}
b2e771
%package -n python2-jinja2
b2e771
Summary:        General purpose template engine for python2
b2e771
BuildRequires:  python2-devel
b2e771
BuildRequires:  python2-setuptools
b2e771
BuildRequires:  python2-babel >= 0.8
b2e771
BuildRequires:  python2-markupsafe >= 0.23
b2e771
Requires:       python2-babel >= 0.8
b2e771
Requires:       python2-markupsafe >= 0.23
b2e771
Requires:       python2-setuptools
b2e771
%{?python_provide:%python_provide python2-jinja2}
b2e771
b2e771
%description -n python2-jinja2
b2e771
Jinja2 is a template engine written in pure Python.  It provides a
b2e771
Django inspired non-XML syntax but supports inline expressions and an
b2e771
optional sandboxed environment.
b2e771
b2e771
If you have any exposure to other text-based template languages, such
b2e771
as Smarty or Django, you should feel right at home with Jinja2. It's
b2e771
both designer and developer friendly by sticking to Python's
b2e771
principles and adding functionality useful for templating
b2e771
environments.
b2e771
%endif # with python2
b2e771
b2e771
b2e771
%if %{with python3}
b2e771
%package -n python%{python3_pkgversion}-jinja2
b2e771
Summary:        General purpose template engine for python3
b2e771
BuildRequires:  python%{python3_pkgversion}-devel
b2e771
BuildRequires:  python%{python3_pkgversion}-setuptools
b2e771
BuildRequires:  python%{python3_pkgversion}-babel >= 0.8
b2e771
BuildRequires:  python%{python3_pkgversion}-markupsafe >= 0.23
b2e771
BuildRequires:  python%{python3_pkgversion}-pytest
b2e771
BuildRequires:  python%{python3_pkgversion}-rpm-macros
b2e771
%if %{with docs}
b2e771
BuildRequires:  %{_bindir}/sphinx-build-3.8
b2e771
BuildRequires:  make
b2e771
BuildRequires:  python%{python3_pkgversion}-Pallets-Sphinx-Themes
b2e771
BuildRequires:  python%{python3_pkgversion}-sphinxcontrib-log-cabinet
b2e771
BuildRequires:  python%{python3_pkgversion}-sphinx-issues
b2e771
%endif
b2e771
Requires:       python%{python3_pkgversion}-babel >= 0.8
b2e771
Requires:       python%{python3_pkgversion}-markupsafe >= 0.23
b2e771
Requires:       python%{python3_pkgversion}-setuptools
b2e771
%{?python_provide:%python_provide python%{python3_pkgversion}-jinja2}
b2e771
b2e771
%description -n python%{python3_pkgversion}-jinja2
b2e771
Jinja2 is a template engine written in pure Python.  It provides a
b2e771
Django inspired non-XML syntax but supports inline expressions and an
b2e771
optional sandboxed environment.
b2e771
b2e771
If you have any exposure to other text-based template languages, such
b2e771
as Smarty or Django, you should feel right at home with Jinja2. It's
b2e771
both designer and developer friendly by sticking to Python's
b2e771
principles and adding functionality useful for templating
b2e771
environments.
b2e771
%endif # with python3
b2e771
b2e771
b2e771
%prep
b2e771
%autosetup -n %{srcname}-%{version}
b2e771
b2e771
# cleanup
b2e771
find . -name '*.pyo' -o -name '*.pyc' -delete
b2e771
b2e771
%build
b2e771
%if %{with python2}
b2e771
%py2_build
b2e771
%endif # with python2
b2e771
b2e771
%if %{with python3}
b2e771
%py3_build
b2e771
%if %{with docs}
b2e771
make -C docs html PYTHONPATH=$(pwd) SPHINXBUILD=sphinx-build-3
b2e771
# remove hidden file
b2e771
rm -rf docs/_build/html/.buildinfo
b2e771
%endif # with docs
b2e771
%endif # with python3
b2e771
b2e771
b2e771
%install
b2e771
%if %{with python2}
b2e771
%py2_install
b2e771
b2e771
# these files are valid only on Python 3.6+
b2e771
rm %{buildroot}%{python2_sitelib}/jinja2/asyncsupport.py
b2e771
rm %{buildroot}%{python2_sitelib}/jinja2/asyncfilters.py
b2e771
%endif # with python2
b2e771
b2e771
%if %{with python3}
b2e771
%py3_install
b2e771
b2e771
%if ! %{with async}
b2e771
# these files are valid only on Python 3.6+
b2e771
rm %{buildroot}%{python3_sitelib}/jinja2/asyncsupport.py
b2e771
rm %{buildroot}%{python3_sitelib}/jinja2/asyncfilters.py
b2e771
%endif # ! with async
b2e771
%endif # with python3
b2e771
b2e771
b2e771
%check
b2e771
%if %{with python3}
b2e771
%{__python3} -m pytest tests
b2e771
%endif # with python3
b2e771
b2e771
b2e771
%if %{with python2}
b2e771
%files -n python2-jinja2
b2e771
%doc CHANGES.rst
b2e771
%doc ext
b2e771
%doc examples
b2e771
%license LICENSE.rst
b2e771
%if %{with docs}
b2e771
%doc docs/_build/html
b2e771
%endif
b2e771
%{python2_sitelib}/jinja2
b2e771
%{python2_sitelib}/Jinja2-%{version}-py?.?.egg-info
b2e771
%endif # with python2
b2e771
b2e771
b2e771
%if %{with python3}
b2e771
%files -n python%{python3_pkgversion}-jinja2
b2e771
%doc CHANGES.rst
b2e771
%doc ext
b2e771
%doc examples
b2e771
%license LICENSE.rst
b2e771
%if %{with docs}
b2e771
%doc docs/_build/html
b2e771
%endif
b2e771
%{python3_sitelib}/jinja2
b2e771
%{python3_sitelib}/Jinja2-%{version}-py?.?.egg-info
b2e771
%endif # with python3
b2e771
b2e771
b2e771
%changelog
b2e771
* Fri Dec 13 2019 Tomas Orsava <torsava@redhat.com> - 2.10.3-4
b2e771
- Exclude unsupported i686 arch
b2e771
b2e771
* Wed Nov 20 2019 Lumír Balhar <lbalhar@redhat.com> - 2.10.3-3
b2e771
- Adjusted for Python 3.8 module in RHEL 8
b2e771
b2e771
* Wed Nov 20 2019 Thomas Moschny <thomas.moschny@gmx.de> - 2.10.3-2
b2e771
- Add missing BR on make.
b2e771
b2e771
* Mon Nov 11 2019 Lumír Balhar <lbalhar@redhat.com> - 2.10.3-1
b2e771
- New upstream version (2.10.3)
b2e771
b2e771
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.10.1-5
b2e771
- Rebuilt for Python 3.8.0rc1 (#1748018)
b2e771
b2e771
* Sat Aug 17 2019 Miro Hrončok <mhroncok@redhat.com> - 2.10.1-4
b2e771
- Rebuilt for Python 3.8
b2e771
b2e771
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.10.1-3
b2e771
- Bootstrap for Python 3.8
b2e771
b2e771
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.1-2
b2e771
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
b2e771
b2e771
* Wed Apr 10 2019 Thomas Moschny <thomas.moschny@gmx.de> - 2.10.1-1
b2e771
- Update to 2.10.1.
b2e771
- Update specfile.
b2e771
b2e771
* Wed Feb 27 2019 Phil Wyett <philwyett@kathenas.org> - 2.10-8
b2e771
- Fix FTBS due to bad conditional
b2e771
- Add version requirement for markupsafe
b2e771
b2e771
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.10-7
b2e771
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
b2e771
b2e771
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.10-6
b2e771
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
b2e771
b2e771
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 2.10-5
b2e771
- Rebuilt for Python 3.7
b2e771
b2e771
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 2.10-4
b2e771
- Bootstrap for Python 3.7
b2e771
b2e771
* Mon Apr 16 2018 Charalampos Stratakis <cstratak@redhat.com> - 2.10-3
b2e771
- Don't build the Python 2 subpackage on EL > 7
b2e771
b2e771
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.10-2
b2e771
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
b2e771
b2e771
* Thu Nov 16 2017 Thomas Moschny <thomas.moschny@gmx.de> - 2.10-1
b2e771
- Update to 2.10.
b2e771
- Use %%bcond.
b2e771
- Move BRs to their respective subpackages.
b2e771
b2e771
* Fri Oct 20 2017 Troy Dawson <tdawson@redhat.com> - 2.9.6-4
b2e771
- Really cleanup spec file conditionals
b2e771
b2e771
* Fri Sep 29 2017 Troy Dawson <tdawson@redhat.com> - 2.9.6-3
b2e771
- Cleanup spec file conditionals
b2e771
b2e771
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-2
b2e771
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b2e771
b2e771
* Wed Apr  5 2017 Thomas Moschny <thomas.moschny@gmx.de> - 2.9.6-1
b2e771
- Update to 2.9.6.
b2e771
b2e771
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.5-2
b2e771
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
b2e771
b2e771
* Sun Jan 29 2017 Thomas Moschny <thomas.moschny@gmx.de> - 2.9.5-1
b2e771
- Update to 2.9.5.
b2e771
b2e771
* Fri Jan 13 2017 Thomas Moschny <thomas.moschny@gmx.de> - 2.9.4-1
b2e771
- Update to 2.9.4.
b2e771
b2e771
* Sat Dec 31 2016 Thomas Moschny <thomas.moschny@gmx.de> - 2.8.1-1
b2e771
- Update to 2.8.1.
b2e771
b2e771
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.8-8
b2e771
- Rebuild for Python 3.6
b2e771
b2e771
* Thu Sep 22 2016 Orion Poplawski <orion@cora.nwra.com> - 2.8-7
b2e771
- Ship python2-jinja2 (bug #1378519)
b2e771
- Modernize spec
b2e771
b2e771
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8-6
b2e771
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
b2e771
b2e771
* Fri Feb  5 2016 Thomas Moschny <thomas.moschny@gmx.de> - 2.8-5
b2e771
- Do not call py.test, there are currently no tests in the tarball.
b2e771
b2e771
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.8-4
b2e771
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
b2e771
b2e771
* Mon Oct 12 2015 Robert Kuska <rkuska@redhat.com> - 2.8-3
b2e771
- Rebuilt for Python3.5 rebuild
b2e771
b2e771
* Mon Jul 27 2015 Thomas Moschny <thomas.moschny@gmx.de> - 2.8-2
b2e771
- Apply updates Python packaging guidelines.
b2e771
- Mark LICENSE with %%license.
b2e771
b2e771
* Sun Jul 26 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 2.8-1
b2e771
- Upstream 2.8
b2e771
b2e771
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.3-3
b2e771
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
b2e771
b2e771
* Tue Dec 2 2014 Orion Poplawski <orion@cora.nwra.com> - 2.7.3-2
b2e771
- Add Requires python(3)-setuptools (bug #1168774)
b2e771
b2e771
* Sat Jun  7 2014 Thomas Moschny <thomas.moschny@gmx.de> - 2.7.3-1
b2e771
- Update to 2.7.3.
b2e771
- Reenable docs.
b2e771
b2e771
* Sat May 10 2014 Orion Poplawski <orion@cora.nwra.com> - 2.7.2-2
b2e771
- Bootstrap (without docs) build for Python 3.4
b2e771
b2e771
* Fri Jan 10 2014 Thomas Moschny <thomas.moschny@gmx.de> - 2.7.2-1
b2e771
- Update to 2.7.2.
b2e771
- Update python3 conditional.
b2e771
b2e771
* Fri Aug 16 2013 Thomas Moschny <thomas.moschny@gmx.de> - 2.7.1-1
b2e771
- Update to 2.7.1.
b2e771
b2e771
* Thu Jul 25 2013 Orion Poplawski <orion@cora.nwra.com> - 2.7-1
b2e771
- Update to 2.7
b2e771
- spec cleanup
b2e771
b2e771
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-6
b2e771
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
b2e771
b2e771
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 2.6-5
b2e771
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
b2e771
b2e771
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 2.6-4
b2e771
- remove rhel logic from with_python3 conditional
b2e771
b2e771
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-3
b2e771
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
b2e771
b2e771
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-2
b2e771
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
b2e771
b2e771
* Mon Jul 25 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.6-1
b2e771
- Update to 2.6.
b2e771
b2e771
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.5-4
b2e771
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
b2e771
b2e771
* Tue Jan 18 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.5-3
b2e771
- Re-enable html doc generation.
b2e771
- Remove conditional for F-12 and below.
b2e771
- Do not silently fail the testsuite for with py3k.
b2e771
b2e771
* Mon Nov  1 2010 Michel Salim <salimma@fedoraproject.org> - 2.5.5-2
b2e771
- Move python3 runtime requirements to python3 subpackage
b2e771
b2e771
* Wed Oct 27 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.5-1
b2e771
- Update to 2.5.5.
b2e771
b2e771
* Wed Aug 25 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.2-4
b2e771
- Revert to previous behavior: fail the build on failed test.
b2e771
- Rebuild for Python 3.2.
b2e771
b2e771
* Wed Aug 25 2010 Dan Horák <dan[at]danny.cz> - 2.5.2-3
b2e771
- %%ifnarch doesn't work on noarch package so don't fail the build on failed tests
b2e771
b2e771
* Wed Aug 25 2010 Dan Horák <dan[at]danny.cz> - 2.5.2-2
b2e771
- disable the testsuite on s390(x)
b2e771
b2e771
* Thu Aug 19 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.2-1
b2e771
- Update to upstream version 2.5.2.
b2e771
- Package depends on python-markupsafe and is noarch now.
b2e771
b2e771
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-4
b2e771
- add explicit build-requirement on python-setuptools
b2e771
- fix doc disablement for python3 subpackage
b2e771
b2e771
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-3
b2e771
- support disabling documentation in the build to break a circular build-time
b2e771
dependency with python-sphinx; disable docs for now
b2e771
b2e771
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-2
b2e771
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
b2e771
b2e771
* Tue Jul 13 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5-1
b2e771
- Update to upstream version 2.5.
b2e771
- Create python3 subpackage.
b2e771
- Minor specfile fixes.
b2e771
- Add examples directory.
b2e771
- Thanks to Gareth Armstrong for additional hints.
b2e771
b2e771
* Wed Apr 21 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.4.1-1
b2e771
- Update to 2.4.1.
b2e771
b2e771
* Tue Apr 13 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.4-1
b2e771
- Update to 2.4.
b2e771
b2e771
* Tue Feb 23 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.3.1-1
b2e771
- Update to 2.3.1.
b2e771
- Docs are built using Sphinx now.
b2e771
- Run the testsuite.
b2e771
b2e771
* Sat Sep 19 2009 Thomas Moschny <thomas.moschny@gmx.de> - 2.2.1-1
b2e771
- Update to 2.2.1, mainly a bugfix release.
b2e771
- Remove patch no longer needed.
b2e771
- Remove conditional for FC-8.
b2e771
- Compilation of speedup module has to be explicitly requested now.
b2e771
b2e771
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-3
b2e771
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
b2e771
b2e771
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-2
b2e771
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
b2e771
b2e771
* Sat Jan 10 2009 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.1-1
b2e771
- Update to 2.1.1 (bugfix release).
b2e771
b2e771
* Thu Dec 18 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.1-1
b2e771
- Update to 2.1, which fixes a number of bugs.
b2e771
  See http://jinja.pocoo.org/2/documentation/changelog#version-2-1.
b2e771
b2e771
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.0-3
b2e771
- Rebuild for Python 2.6
b2e771
b2e771
* Tue Jul 22 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0-2
b2e771
- Use rpm buildroot macro instead of RPM_BUILD_ROOT.
b2e771
b2e771
* Sun Jul 20 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0-1
b2e771
- Upstream released 2.0.
b2e771
b2e771
* Sun Jun 29 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0-0.1.rc1
b2e771
- Modified specfile from the existing python-jinja package.