Blame SPECS/python-jinja2.spec

e987d2
%{?scl:%scl_package python-jinja2}
e987d2
%{!?scl:%global pkg_name %{name}}
e987d2
e987d2
# Enable building without docs to avoid a circular dependency between this
e987d2
# and python-sphinx:
e987d2
%global with_docs 1
e987d2
e987d2
Name:		%{?scl_prefix}python-jinja2
e987d2
Version:	2.6
889252
Release:	15%{?dist}
e987d2
Summary:	General purpose template engine
e987d2
Group:		Development/Languages
e987d2
License:	BSD
e987d2
URL:		http://jinja.pocoo.org/
e987d2
Source0:	http://pypi.python.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
a97ff4
# This patch consists of two upstream patches merged and rebased for 2.2.1
a97ff4
#  (the first upstream patch introduced CVE-2014-0012 and the second fixed it)
a97ff4
#  https://github.com/mitsuhiko/jinja2/commit/acb672b6a179567632e032f547582f30fa2f4aa7
a97ff4
#  https://github.com/mitsuhiko/jinja2/pull/296/files
a97ff4
Patch0:         %{pkg_name}-fix-CVE-2014-1402.patch
889252
889252
# Fix CVE-2016-10745
889252
# Also bundling the EscapeFormatter class from markupsafe >= 0.21, as we don't ship
889252
# that version in RHEL7 and it's required for the CVE fix
889252
# https://github.com/pallets/jinja/commit/9b53045c34e61013dc8f09b7e52a555fa16bed16
889252
# https://bugzilla.redhat.com/show_bug.cgi?id=1701310
889252
Patch1: python-jinja2-fix-CVE-2016-10745.patch
889252
e987d2
BuildRoot:	%{_tmppath}/%{pkg_name}-%{version}-%{release}-root-%(%{__id_u} -n)
e987d2
BuildArch:	noarch
e987d2
BuildRequires:	%{?scl_prefix}python-devel
e987d2
BuildRequires:	%{?scl_prefix}python-setuptools
e987d2
BuildRequires:	%{?scl_prefix}python-markupsafe
889252
e987d2
%if 0%{?with_docs}
e987d2
BuildRequires:	%{?scl_prefix}python-sphinx
e987d2
%endif # with_docs
e987d2
Requires:	%{?scl_prefix}python-babel >= 0.8
e987d2
Requires:	%{?scl_prefix}python-markupsafe
e987d2
e987d2
%description
e987d2
Jinja2 is a template engine written in pure Python.  It provides a
e987d2
Django inspired non-XML syntax but supports inline expressions and an
e987d2
optional sandboxed environment.
e987d2
e987d2
If you have any exposure to other text-based template languages, such
e987d2
as Smarty or Django, you should feel right at home with Jinja2. It's
e987d2
both designer and developer friendly by sticking to Python's
e987d2
principles and adding functionality useful for templating
e987d2
environments.
e987d2
e987d2
%prep
e987d2
%setup -q -n Jinja2-%{version}
e987d2
e987d2
# cleanup
e987d2
find . -name '*.pyo' -o -name '*.pyc' -delete
e987d2
a97ff4
%patch0 -p0
889252
%patch1 -p1
a97ff4
e987d2
# fix EOL
e987d2
sed -i 's|\r$||g' LICENSE
e987d2
e987d2
%if 0%{?with_python3}
e987d2
cp -a . %{py3dir}
e987d2
%endif # with_python3
e987d2
e987d2
e987d2
%build
e987d2
%{?scl:scl enable %{scl} "}
e987d2
%{__python} setup.py build
e987d2
%{?scl:"}
e987d2
e987d2
# for now, we build docs using Python 2.x and use that for both
e987d2
# packages.
e987d2
%if 0%{?with_docs}
e987d2
%{?scl:scl enable %{scl} "}
e987d2
make -C docs html
e987d2
%{?scl:"}
e987d2
%endif # with_docs
e987d2
e987d2
%install
e987d2
rm -rf %{buildroot}
e987d2
%{?scl:scl enable %{scl} "}
e987d2
%{__python} setup.py install -O1 --skip-build \
e987d2
	    --root %{buildroot}
e987d2
%{?scl:"}
e987d2
e987d2
# remove hidden file
e987d2
rm -rf docs/_build/html/.buildinfo
e987d2
e987d2
%clean
e987d2
rm -rf %{buildroot}
e987d2
e987d2
%check
e987d2
%{?scl:scl enable %{scl} "}
e987d2
make test
e987d2
%{?scl:"}
e987d2
e987d2
%files
e987d2
%defattr(-,root,root,-)
e987d2
%doc AUTHORS CHANGES LICENSE
e987d2
%if 0%{?with_docs}
e987d2
%doc docs/_build/html
e987d2
%endif # with_docs
e987d2
%doc ext
e987d2
%doc examples
e987d2
%{python_sitelib}/*
e987d2
%exclude %{python_sitelib}/jinja2/_debugsupport.c
e987d2
e987d2
%changelog
889252
* Thu May 02 2019 Charalampos Stratakis <cstratak@redhat.com> - 2.6-15
889252
- Fix for CVE-2016-10745
889252
Resolves: rhbz#1701310
889252
98f805
* Fri May 25 2018 Charalampos Stratakis <cstratak@redhat.com> - 2.6-14
98f805
- Rebuild for multi-arch bootstrap
98f805
- Enable docs
98f805
98f805
* Thu May 24 2018 Charalampos Stratakis <cstratak@redhat.com> - 2.6-13
98f805
- Rebuild without docs
98f805
98f805
* Tue Jun 24 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.6-12
98f805
- Rebuild to fix 1102892
98f805
Resolves: rhbz#1102892
98f805
a97ff4
* Fri May 30 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.6-11
a97ff4
- Fix CVE-2014-1402
a97ff4
Resolves: rhbz#1102891
a97ff4
e987d2
* Thu Oct 24 2013 Robert Kuska <rkuska@redhat.com> - 2.6-10
e987d2
- Rebuild with doc subpackage
e987d2
e987d2
* Tue May 07 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 2.6-9
e987d2
- Rebuild to generate bytecode properly after fixing rhbz#956289
e987d2
e987d2
* Wed Oct 10 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 2.6-8
e987d2
- Enable building with documentation, now for real.
e987d2
e987d2
* Wed Sep 19 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 2.6-7
e987d2
- Enable building with documentation.
e987d2
e987d2
* Wed Sep 19 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 2.6-6
e987d2
- Rebuilt for SCL.
e987d2
e987d2
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 2.6-5
e987d2
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
e987d2
e987d2
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 2.6-4
e987d2
- remove rhel logic from with_python3 conditional
e987d2
e987d2
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-3
e987d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
e987d2
e987d2
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-2
e987d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
e987d2
e987d2
* Mon Jul 25 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.6-1
e987d2
- Update to 2.6.
e987d2
e987d2
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.5-4
e987d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
e987d2
e987d2
* Tue Jan 18 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.5-3
e987d2
- Re-enable html doc generation.
e987d2
- Remove conditional for F-12 and below.
e987d2
- Do not silently fail the testsuite for with py3k.
e987d2
e987d2
* Mon Nov  1 2010 Michel Salim <salimma@fedoraproject.org> - 2.5.5-2
e987d2
- Move python3 runtime requirements to python3 subpackage
e987d2
e987d2
* Wed Oct 27 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.5-1
e987d2
- Update to 2.5.5.
e987d2
e987d2
* Wed Aug 25 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.2-4
e987d2
- Revert to previous behavior: fail the build on failed test.
e987d2
- Rebuild for Python 3.2.
e987d2
e987d2
* Wed Aug 25 2010 Dan Horák <dan[at]danny.cz> - 2.5.2-3
e987d2
- %%ifnarch doesn't work on noarch package so don't fail the build on failed tests
e987d2
e987d2
* Wed Aug 25 2010 Dan Horák <dan[at]danny.cz> - 2.5.2-2
e987d2
- disable the testsuite on s390(x)
e987d2
e987d2
* Thu Aug 19 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.2-1
e987d2
- Update to upstream version 2.5.2.
e987d2
- Package depends on python-markupsafe and is noarch now.
e987d2
e987d2
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-4
e987d2
- add explicit build-requirement on python-setuptools
e987d2
- fix doc disablement for python3 subpackage
e987d2
e987d2
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-3
e987d2
- support disabling documentation in the build to break a circular build-time
e987d2
dependency with python-sphinx; disable docs for now
e987d2
e987d2
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-2
e987d2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
e987d2
e987d2
* Tue Jul 13 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5-1
e987d2
- Update to upstream version 2.5.
e987d2
- Create python3 subpackage. 
e987d2
- Minor specfile fixes.
e987d2
- Add examples directory.
e987d2
- Thanks to Gareth Armstrong for additional hints.
e987d2
e987d2
* Wed Apr 21 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.4.1-1
e987d2
- Update to 2.4.1.
e987d2
e987d2
* Tue Apr 13 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.4-1
e987d2
- Update to 2.4.
e987d2
e987d2
* Tue Feb 23 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.3.1-1
e987d2
- Update to 2.3.1.
e987d2
- Docs are built using Sphinx now.
e987d2
- Run the testsuite.
e987d2
e987d2
* Sat Sep 19 2009 Thomas Moschny <thomas.moschny@gmx.de> - 2.2.1-1
e987d2
- Update to 2.2.1, mainly a bugfix release.
e987d2
- Remove patch no longer needed.
e987d2
- Remove conditional for FC-8.
e987d2
- Compilation of speedup module has to be explicitly requested now.
e987d2
e987d2
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-3
e987d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
e987d2
e987d2
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-2
e987d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
e987d2
e987d2
* Sat Jan 10 2009 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.1-1
e987d2
- Update to 2.1.1 (bugfix release).
e987d2
e987d2
* Thu Dec 18 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.1-1
e987d2
- Update to 2.1, which fixes a number of bugs.
e987d2
  See http://jinja.pocoo.org/2/documentation/changelog#version-2-1.
e987d2
e987d2
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.0-3
e987d2
- Rebuild for Python 2.6
e987d2
e987d2
* Tue Jul 22 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0-2
e987d2
- Use rpm buildroot macro instead of RPM_BUILD_ROOT.
e987d2
e987d2
* Sun Jul 20 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0-1
e987d2
- Upstream released 2.0.
e987d2
e987d2
* Sun Jun 29 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0-0.1.rc1
e987d2
- Modified specfile from the existing python-jinja package.