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