a2966b
%if 0%{?rhel} > 7
a2966b
# Disable python2 build by default
a2966b
%bcond_with python2
a2966b
%else
a2966b
%bcond_without python2
a2966b
%endif
a2966b
a2966b
%if 0%{?fedora} || 0%{?rhel} > 7
a2966b
%bcond_without python3
a2966b
%else
a2966b
%bcond_with python3
a2966b
%endif
a2966b
a2966b
# Enable building without docs to avoid a circular dependency between this
a2966b
# and python-sphinx:
a2966b
%if %{with python3}
a2966b
%bcond_without docs
a2966b
%else
a2966b
%bcond_with docs
a2966b
%endif
a2966b
a2966b
%if 0%{?fedora} > 25 || 0%{?rhel} > 7
a2966b
%bcond_without async
a2966b
%else
a2966b
%bcond_with async
a2966b
%endif
a2966b
a2966b
Name:           python-jinja2
f75673
Version:        2.10.1
f75673
Release:        2%{?dist}
a2966b
Summary:        General purpose template engine
a2966b
Group:          Development/Languages
a2966b
License:        BSD
a2966b
URL:            http://jinja.pocoo.org/
a2966b
Source0:        https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
a2966b
a2966b
BuildArch:      noarch
a2966b
a2966b
%description
a2966b
Jinja2 is a template engine written in pure Python.  It provides a
a2966b
Django inspired non-XML syntax but supports inline expressions and an
a2966b
optional sandboxed environment.
a2966b
a2966b
If you have any exposure to other text-based template languages, such
a2966b
as Smarty or Django, you should feel right at home with Jinja2. It's
a2966b
both designer and developer friendly by sticking to Python's
a2966b
principles and adding functionality useful for templating
a2966b
environments.
a2966b
a2966b
a2966b
%if %{with python2}
a2966b
%package -n python2-jinja2
a2966b
Summary:        General purpose template engine for python2
a2966b
BuildRequires:  python2-devel
a2966b
BuildRequires:  python2-setuptools
a2966b
BuildRequires:  python2-markupsafe
a2966b
BuildRequires:  python2-pytest
a2966b
Requires:       python2-markupsafe
a2966b
Requires:       python2-setuptools
a2966b
%{?python_provide:%python_provide python2-jinja2}
a2966b
a2966b
%description -n python2-jinja2
a2966b
Jinja2 is a template engine written in pure Python.  It provides a
a2966b
Django inspired non-XML syntax but supports inline expressions and an
a2966b
optional sandboxed environment.
a2966b
a2966b
If you have any exposure to other text-based template languages, such
a2966b
as Smarty or Django, you should feel right at home with Jinja2. It's
a2966b
both designer and developer friendly by sticking to Python's
a2966b
principles and adding functionality useful for templating
a2966b
environments.
a2966b
%endif # with python2
a2966b
a2966b
a2966b
%if %{with python3}
a2966b
%package -n python3-jinja2
a2966b
Summary:        General purpose template engine for python3
a2966b
Group:          Development/Languages
a2966b
BuildRequires:  python3-devel
a2966b
BuildRequires:  python3-setuptools
a2966b
BuildRequires:  python3-babel >= 0.8
a2966b
BuildRequires:  python3-markupsafe
a2966b
BuildRequires:  python3-pytest
a2966b
%if %{with docs}
a2966b
BuildRequires:  %{_bindir}/sphinx-build-3
a2966b
%endif
a2966b
Requires:       python3-babel >= 0.8
a2966b
Requires:       python3-markupsafe
a2966b
%if 0%{?rhel} && 0%{?rhel} >= 8
a2966b
Requires:       platform-python-setuptools
a2966b
%else
a2966b
Requires:       python3-setuptools
a2966b
%endif
a2966b
%{?python_provide:%python_provide python3-jinja2}
a2966b
a2966b
%description -n python3-jinja2
a2966b
Jinja2 is a template engine written in pure Python.  It provides a
a2966b
Django inspired non-XML syntax but supports inline expressions and an
a2966b
optional sandboxed environment.
a2966b
a2966b
If you have any exposure to other text-based template languages, such
a2966b
as Smarty or Django, you should feel right at home with Jinja2. It's
a2966b
both designer and developer friendly by sticking to Python's
a2966b
principles and adding functionality useful for templating
a2966b
environments.
a2966b
%endif # with python3
a2966b
a2966b
a2966b
%prep
a2966b
%setup -qc -n Jinja2-%{version}
a2966b
# cleanup
a2966b
find Jinja2-%{version} -name '*.pyo' -o -name '*.pyc' -delete
a2966b
a2966b
# fix EOL
a2966b
sed -i 's|\r$||g' Jinja2-%{version}/LICENSE
a2966b
a2966b
mv Jinja2-%{version} python2
a2966b
cp -av python2 python3
a2966b
a2966b
a2966b
%build
a2966b
%if %{with python2}
a2966b
pushd python2
a2966b
%py2_build
a2966b
popd
a2966b
%endif # with python2
a2966b
a2966b
%if %{with python3}
a2966b
pushd python3
a2966b
%py3_build
a2966b
%if %{with docs}
a2966b
make -C docs html PYTHONPATH=$(pwd) SPHINXBUILD=sphinx-build-3
a2966b
%endif # with docs
a2966b
popd
a2966b
%endif # with python3
a2966b
a2966b
a2966b
%install
a2966b
%if %{with python2}
a2966b
pushd python2
a2966b
%py2_install
a2966b
a2966b
# these files are valid only on Python 3.6+
a2966b
rm %{buildroot}%{python2_sitelib}/jinja2/asyncsupport.py
a2966b
rm %{buildroot}%{python2_sitelib}/jinja2/asyncfilters.py
a2966b
popd
a2966b
%endif # with python2
a2966b
a2966b
%if %{with python3}
a2966b
pushd python3
a2966b
%py3_install
a2966b
a2966b
%if %{with docs}
a2966b
# remove hidden file
a2966b
rm -rf docs/_build/html/.buildinfo
a2966b
%endif
a2966b
a2966b
%if ! %{with async}
a2966b
# these files are valid only on Python 3.6+
a2966b
rm %{buildroot}%{python3_sitelib}/jinja2/asyncsupport.py
a2966b
rm %{buildroot}%{python3_sitelib}/jinja2/asyncfilters.py
a2966b
%endif # ! with async
a2966b
popd
a2966b
%endif # with python3
a2966b
a2966b
a2966b
%check
a2966b
%if %{with python2}
a2966b
pushd python2
a2966b
# there are currently no tests in the jinja2 tarball
a2966b
# make test
a2966b
popd
a2966b
%endif # with python2
a2966b
a2966b
%if %{with python3}
a2966b
pushd python3
a2966b
# there are currently no tests in the jinja2 tarball
a2966b
# make test
a2966b
popd
a2966b
%endif # with python3
a2966b
a2966b
a2966b
%if %{with python2}
a2966b
%files -n python2-jinja2
a2966b
%doc python2/AUTHORS
a2966b
%doc python2/CHANGES.rst
a2966b
%doc python2/ext
a2966b
%doc python2/examples
a2966b
%license python2/LICENSE
a2966b
%{python2_sitelib}/jinja2
a2966b
%{python2_sitelib}/Jinja2-%{version}-py?.?.egg-info
a2966b
%endif # with python2
a2966b
a2966b
a2966b
%if %{with python3}
a2966b
%files -n python3-jinja2
a2966b
%doc python3/AUTHORS
a2966b
%doc python3/CHANGES.rst
a2966b
%doc python3/ext
a2966b
%doc python3/examples
a2966b
%license python3/LICENSE
a2966b
%if %{with docs}
a2966b
%doc python3/docs/_build/html
a2966b
%endif
a2966b
%{python3_sitelib}/jinja2
a2966b
%{python3_sitelib}/Jinja2-%{version}-py?.?.egg-info
a2966b
%endif # with python3
a2966b
a2966b
a2966b
%changelog
f75673
* Tue Apr 30 2019 Lumír Balhar <lbalhar@redhat.com> - 2.10.1-2
f75673
- Rebuild of package to go through gating
f75673
- Resolves: rhbz#1701300
f75673
f75673
* Thu Apr 25 2019 Lumír Balhar <lbalhar@redhat.com> - 2.10.1-1
f75673
- Rebase to 2.10.1 (security update) to fix CVE-2019-10906
f75673
- Resolves: rhbz#1701300
f75673
a2966b
* Fri Nov 16 2018 Lumír Balhar <lbalhar@redhat.com> - 2.10-9
a2966b
- Require platform-python-setuptools instead of python3-setuptools
a2966b
- Resolves: rhbz#1650536
a2966b
a2966b
* Mon Aug 06 2018 Lumír Balhar <lbalhar@redhat.com> - 2.10-8
a2966b
- Revert changes commited to wrong branch
a2966b
a2966b
* Sat Aug 04 2018 Lumír Balhar <lbalhar@redhat.com> - 2.10-7
a2966b
- Fix conditions
a2966b
a2966b
* Sat Aug 04 2018 Lumír Balhar <lbalhar@redhat.com> - 2.10-6
a2966b
- Specfile cleanup and fixes
a2966b
a2966b
* Mon Jun 25 2018 Lumír Balhar <Lbalhar@redhat.com> - 2.10-5
a2966b
- Disable Python 2 build by default
a2966b
a2966b
* Mon Jun 25 2018 Lumír Balhar <Lbalhar@redhat.com> - 2.10-4
a2966b
- Allow build with Python 2
a2966b
a2966b
* Mon May 28 2018 Petr Viktorin <pviktori@redhat.com> - 2.10-3
a2966b
- Remove docs from Python 2 package
a2966b
- Remove dependency on python2-babel and python2-sphinx
a2966b
a2966b
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.10-2
a2966b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
a2966b
a2966b
* Thu Nov 16 2017 Thomas Moschny <thomas.moschny@gmx.de> - 2.10-1
a2966b
- Update to 2.10.
a2966b
- Use %%bcond.
a2966b
- Move BRs to their respective subpackages.
a2966b
a2966b
* Fri Oct 20 2017 Troy Dawson <tdawson@redhat.com> - 2.9.6-4
a2966b
- Really cleanup spec file conditionals
a2966b
a2966b
* Fri Sep 29 2017 Troy Dawson <tdawson@redhat.com> - 2.9.6-3
a2966b
- Cleanup spec file conditionals
a2966b
a2966b
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-2
a2966b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
a2966b
a2966b
* Wed Apr  5 2017 Thomas Moschny <thomas.moschny@gmx.de> - 2.9.6-1
a2966b
- Update to 2.9.6.
a2966b
a2966b
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.5-2
a2966b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
a2966b
a2966b
* Sun Jan 29 2017 Thomas Moschny <thomas.moschny@gmx.de> - 2.9.5-1
a2966b
- Update to 2.9.5.
a2966b
a2966b
* Fri Jan 13 2017 Thomas Moschny <thomas.moschny@gmx.de> - 2.9.4-1
a2966b
- Update to 2.9.4.
a2966b
a2966b
* Sat Dec 31 2016 Thomas Moschny <thomas.moschny@gmx.de> - 2.8.1-1
a2966b
- Update to 2.8.1.
a2966b
a2966b
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.8-8
a2966b
- Rebuild for Python 3.6
a2966b
a2966b
* Thu Sep 22 2016 Orion Poplawski <orion@cora.nwra.com> - 2.8-7
a2966b
- Ship python2-jinja2 (bug #1378519)
a2966b
- Modernize spec
a2966b
a2966b
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8-6
a2966b
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
a2966b
a2966b
* Fri Feb  5 2016 Thomas Moschny <thomas.moschny@gmx.de> - 2.8-5
a2966b
- Do not call py.test, there are currently no tests in the tarball.
a2966b
a2966b
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.8-4
a2966b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
a2966b
a2966b
* Mon Oct 12 2015 Robert Kuska <rkuska@redhat.com> - 2.8-3
a2966b
- Rebuilt for Python3.5 rebuild
a2966b
a2966b
* Mon Jul 27 2015 Thomas Moschny <thomas.moschny@gmx.de> - 2.8-2
a2966b
- Apply updates Python packaging guidelines.
a2966b
- Mark LICENSE with %%license.
a2966b
a2966b
* Sun Jul 26 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 2.8-1
a2966b
- Upstream 2.8
a2966b
a2966b
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.3-3
a2966b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
a2966b
a2966b
* Tue Dec 2 2014 Orion Poplawski <orion@cora.nwra.com> - 2.7.3-2
a2966b
- Add Requires python(3)-setuptools (bug #1168774)
a2966b
a2966b
* Sat Jun  7 2014 Thomas Moschny <thomas.moschny@gmx.de> - 2.7.3-1
a2966b
- Update to 2.7.3.
a2966b
- Reenable docs.
a2966b
a2966b
* Sat May 10 2014 Orion Poplawski <orion@cora.nwra.com> - 2.7.2-2
a2966b
- Bootstrap (without docs) build for Python 3.4
a2966b
a2966b
* Fri Jan 10 2014 Thomas Moschny <thomas.moschny@gmx.de> - 2.7.2-1
a2966b
- Update to 2.7.2.
a2966b
- Update python3 conditional.
a2966b
a2966b
* Fri Aug 16 2013 Thomas Moschny <thomas.moschny@gmx.de> - 2.7.1-1
a2966b
- Update to 2.7.1.
a2966b
a2966b
* Thu Jul 25 2013 Orion Poplawski <orion@cora.nwra.com> - 2.7-1
a2966b
- Update to 2.7
a2966b
- spec cleanup
a2966b
a2966b
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-6
a2966b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
a2966b
a2966b
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 2.6-5
a2966b
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
a2966b
a2966b
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 2.6-4
a2966b
- remove rhel logic from with_python3 conditional
a2966b
a2966b
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-3
a2966b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
a2966b
a2966b
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-2
a2966b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
a2966b
a2966b
* Mon Jul 25 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.6-1
a2966b
- Update to 2.6.
a2966b
a2966b
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.5-4
a2966b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
a2966b
a2966b
* Tue Jan 18 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.5-3
a2966b
- Re-enable html doc generation.
a2966b
- Remove conditional for F-12 and below.
a2966b
- Do not silently fail the testsuite for with py3k.
a2966b
a2966b
* Mon Nov  1 2010 Michel Salim <salimma@fedoraproject.org> - 2.5.5-2
a2966b
- Move python3 runtime requirements to python3 subpackage
a2966b
a2966b
* Wed Oct 27 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.5-1
a2966b
- Update to 2.5.5.
a2966b
a2966b
* Wed Aug 25 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.2-4
a2966b
- Revert to previous behavior: fail the build on failed test.
a2966b
- Rebuild for Python 3.2.
a2966b
a2966b
* Wed Aug 25 2010 Dan Horák <dan[at]danny.cz> - 2.5.2-3
a2966b
- %%ifnarch doesn't work on noarch package so don't fail the build on failed tests
a2966b
a2966b
* Wed Aug 25 2010 Dan Horák <dan[at]danny.cz> - 2.5.2-2
a2966b
- disable the testsuite on s390(x)
a2966b
a2966b
* Thu Aug 19 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.2-1
a2966b
- Update to upstream version 2.5.2.
a2966b
- Package depends on python-markupsafe and is noarch now.
a2966b
a2966b
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-4
a2966b
- add explicit build-requirement on python-setuptools
a2966b
- fix doc disablement for python3 subpackage
a2966b
a2966b
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-3
a2966b
- support disabling documentation in the build to break a circular build-time
a2966b
dependency with python-sphinx; disable docs for now
a2966b
a2966b
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-2
a2966b
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
a2966b
a2966b
* Tue Jul 13 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5-1
a2966b
- Update to upstream version 2.5.
a2966b
- Create python3 subpackage.
a2966b
- Minor specfile fixes.
a2966b
- Add examples directory.
a2966b
- Thanks to Gareth Armstrong for additional hints.
a2966b
a2966b
* Wed Apr 21 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.4.1-1
a2966b
- Update to 2.4.1.
a2966b
a2966b
* Tue Apr 13 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.4-1
a2966b
- Update to 2.4.
a2966b
a2966b
* Tue Feb 23 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.3.1-1
a2966b
- Update to 2.3.1.
a2966b
- Docs are built using Sphinx now.
a2966b
- Run the testsuite.
a2966b
a2966b
* Sat Sep 19 2009 Thomas Moschny <thomas.moschny@gmx.de> - 2.2.1-1
a2966b
- Update to 2.2.1, mainly a bugfix release.
a2966b
- Remove patch no longer needed.
a2966b
- Remove conditional for FC-8.
a2966b
- Compilation of speedup module has to be explicitly requested now.
a2966b
a2966b
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-3
a2966b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
a2966b
a2966b
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-2
a2966b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
a2966b
a2966b
* Sat Jan 10 2009 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.1-1
a2966b
- Update to 2.1.1 (bugfix release).
a2966b
a2966b
* Thu Dec 18 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.1-1
a2966b
- Update to 2.1, which fixes a number of bugs.
a2966b
  See http://jinja.pocoo.org/2/documentation/changelog#version-2-1.
a2966b
a2966b
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.0-3
a2966b
- Rebuild for Python 2.6
a2966b
a2966b
* Tue Jul 22 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0-2
a2966b
- Use rpm buildroot macro instead of RPM_BUILD_ROOT.
a2966b
a2966b
* Sun Jul 20 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0-1
a2966b
- Upstream released 2.0.
a2966b
a2966b
* Sun Jun 29 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0-0.1.rc1
a2966b
- Modified specfile from the existing python-jinja package.