diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7f04bf1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/Jinja2-2.6.tar.gz diff --git a/.python33-python-jinja2.metadata b/.python33-python-jinja2.metadata new file mode 100644 index 0000000..e9dd467 --- /dev/null +++ b/.python33-python-jinja2.metadata @@ -0,0 +1 @@ +f122aeb324b2009bbcee341d0f001a047ac4bbe5 SOURCES/Jinja2-2.6.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index ce46a88..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -\ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/jinja2-add-source-filesize-to-header.patch b/SOURCES/jinja2-add-source-filesize-to-header.patch new file mode 100644 index 0000000..3a57299 --- /dev/null +++ b/SOURCES/jinja2-add-source-filesize-to-header.patch @@ -0,0 +1,21 @@ +commit 9e9cf47c81dc3ecae451b4224168ca6bab2cf701 +Author: Armin Ronacher +Date: Sun Sep 16 08:26:31 2012 +0900 + + Added filesize part to the module compiler. This fixes #131 for 3.3 and later + +diff --git a/jinja2/environment.py b/jinja2/environment.py +index ebb5454..130f9a1 100644 +--- a/jinja2/environment.py ++++ b/jinja2/environment.py +@@ -570,6 +570,10 @@ class Environment(object): + py_header = imp.get_magic() + \ + u'\xff\xff\xff\xff'.encode('iso-8859-15') + ++ # Python 3.3 added a source filesize to the header ++ if sys.version_info >= (3, 3): ++ py_header += '\x00\x00\x00\x00' ++ + def write_file(filename, data, mode): + if zip: + info = ZipInfo(filename) diff --git a/SOURCES/jinja2-fix-doc-build-for-python3.patch b/SOURCES/jinja2-fix-doc-build-for-python3.patch new file mode 100644 index 0000000..5be695a --- /dev/null +++ b/SOURCES/jinja2-fix-doc-build-for-python3.patch @@ -0,0 +1,24 @@ +--- docs/jinjaext.py.orig 2013-01-28 10:46:47.890590120 +0100 ++++ docs/jinjaext.py 2013-01-28 10:48:15.057277175 +0100 +@@ -110,10 +110,10 @@ + def directive(dirname, arguments, options, content, lineno, + content_offset, block_text, state, state_machine): + reverse_mapping = {} +- for name, func in mapping.iteritems(): ++ for name, func in mapping.items(): + reverse_mapping.setdefault(func, []).append(name) + filters = [] +- for func, names in reverse_mapping.iteritems(): ++ for func, names in reverse_mapping.items(): + aliases = sorted(names, key=lambda x: len(x)) + name = aliases.pop() + filters.append((name, aliases, func)) +@@ -145,7 +145,7 @@ + doc.append(p + '.. autoclass:: %s(%s)' % (node.__name__, sig), '') + if node.abstract: + members = [] +- for key, name in node.__dict__.iteritems(): ++ for key, name in node.__dict__.items(): + if not key.startswith('_') and \ + not hasattr(node.__base__, key) and callable(name): + members.append(key) diff --git a/SOURCES/jinja2-fix-unicode-error.patch b/SOURCES/jinja2-fix-unicode-error.patch new file mode 100644 index 0000000..f355762 --- /dev/null +++ b/SOURCES/jinja2-fix-unicode-error.patch @@ -0,0 +1,19 @@ +commit 21a2010bf2768bc658e09666c2135063ce004efc +Author: Armin Ronacher +Date: Sun Sep 16 08:30:50 2012 +0900 + + Fixed an unicode error after 2to3 + +diff --git a/jinja2/environment.py b/jinja2/environment.py +index 130f9a1..1b5dc40 100644 +--- a/jinja2/environment.py ++++ b/jinja2/environment.py +@@ -572,7 +572,7 @@ class Environment(object): + + # Python 3.3 added a source filesize to the header + if sys.version_info >= (3, 3): +- py_header += '\x00\x00\x00\x00' ++ py_header += u'\x00\x00\x00\x00'.encode('iso-8859-15') + + def write_file(filename, data, mode): + if zip: diff --git a/SPECS/python-jinja2.spec b/SPECS/python-jinja2.spec new file mode 100644 index 0000000..115da66 --- /dev/null +++ b/SPECS/python-jinja2.spec @@ -0,0 +1,216 @@ +%{?scl:%scl_package python-jinja2} +%{!?scl:%global pkg_name %{name}} + +# Enable building without docs to avoid a circular dependency between this +# and python-sphinx: +%global with_docs 1 + +Name: %{?scl_prefix}python-jinja2 +Version: 2.6 +Release: 11%{?dist} +Summary: General purpose template engine +Group: Development/Languages +License: BSD +URL: http://jinja.pocoo.org/ +Source0: http://pypi.python.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz +# https://github.com/mitsuhiko/jinja2/commit/9e9cf47c81dc3ecae451b4224168ca6bab2cf701 +Patch0: jinja2-add-source-filesize-to-header.patch +# https://github.com/mitsuhiko/jinja2/commit/21a2010bf2768bc658e09666c2135063ce004efc +Patch1: jinja2-fix-unicode-error.patch +Patch2: jinja2-fix-doc-build-for-python3.patch +BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch +BuildRequires: %{?scl_prefix}python-devel +BuildRequires: %{?scl_prefix}python-setuptools +BuildRequires: %{?scl_prefix}python-markupsafe +%if 0%{?with_docs} +BuildRequires: %{?scl_prefix}python-sphinx +%endif # with_docs +Requires: %{?scl_prefix}python-markupsafe + +%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. + +%prep +%setup -q -n Jinja2-%{version} +%patch0 -p1 +%patch1 -p1 +%patch2 -p0 + +# cleanup +find . -name '*.pyo' -o -name '*.pyc' -delete + +# fix EOL +sed -i 's|\r$||g' LICENSE + +%build +%{?scl:scl enable %{scl} "} +%{__python3} setup.py build +%{?scl:"} + +# for now, we build docs using Python 2.x and use that for both +# packages. +%if 0%{?with_docs} +%{?scl:scl enable %{scl} "} +make -C docs html +%{?scl:"} +%endif # with_docs + +%install +rm -rf %{buildroot} +%{?scl:scl enable %{scl} "} +%{__python3} setup.py install -O1 --skip-build \ + --root %{buildroot} +%{?scl:"} + +# remove hidden file +rm -rf docs/_build/html/.buildinfo + +%clean +rm -rf %{buildroot} + +%check +%{?scl:scl enable %{scl} "} +%{__python3} setup.py test +%{?scl:"} + +%files +%defattr(-,root,root,-) +%doc AUTHORS CHANGES LICENSE +%if 0%{?with_docs} +%doc docs/_build/html +%endif # with_docs +%doc ext +%doc examples +%{python3_sitelib}/* +%exclude %{python3_sitelib}/jinja2/_debugsupport.c + +%changelog +* Mon Nov 18 2013 Robert Kuska - 2.6-11 +- Build with docs + +* Thu May 09 2013 Bohuslav Kabrda - 2.6-10 +- Remove the extraneous dependency on babel. + +* Thu May 09 2013 Bohuslav Kabrda - 2.6-9 +- Rebuild to generate bytecode properly after fixing rhbz#956289 + +* Wed Jan 23 2013 Bohuslav Kabrda - 2.6-8 +- Rebuilt with docs (now really). + +* Wed Oct 17 2012 Bohuslav Kabrda - 2.6-7 +- Rebuilt with docs. + +* Wed Sep 19 2012 Bohuslav Kabrda - 2.6-6 +- Rebuilt for SCL. + +* Sat Aug 04 2012 David Malcolm - 2.6-5 +- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3 + +* Fri Aug 3 2012 David Malcolm - 2.6-4 +- remove rhel logic from with_python3 conditional + +* Sat Jul 21 2012 Fedora Release Engineering - 2.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 2.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Jul 25 2011 Thomas Moschny - 2.6-1 +- Update to 2.6. + +* Tue Feb 08 2011 Fedora Release Engineering - 2.5.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Jan 18 2011 Thomas Moschny - 2.5.5-3 +- Re-enable html doc generation. +- Remove conditional for F-12 and below. +- Do not silently fail the testsuite for with py3k. + +* Mon Nov 1 2010 Michel Salim - 2.5.5-2 +- Move python3 runtime requirements to python3 subpackage + +* Wed Oct 27 2010 Thomas Moschny - 2.5.5-1 +- Update to 2.5.5. + +* Wed Aug 25 2010 Thomas Moschny - 2.5.2-4 +- Revert to previous behavior: fail the build on failed test. +- Rebuild for Python 3.2. + +* Wed Aug 25 2010 Dan Horák - 2.5.2-3 +- %%ifnarch doesn't work on noarch package so don't fail the build on failed tests + +* Wed Aug 25 2010 Dan Horák - 2.5.2-2 +- disable the testsuite on s390(x) + +* Thu Aug 19 2010 Thomas Moschny - 2.5.2-1 +- Update to upstream version 2.5.2. +- Package depends on python-markupsafe and is noarch now. + +* Thu Jul 22 2010 David Malcolm - 2.5-4 +- add explicit build-requirement on python-setuptools +- fix doc disablement for python3 subpackage + +* Thu Jul 22 2010 David Malcolm - 2.5-3 +- support disabling documentation in the build to break a circular build-time +dependency with python-sphinx; disable docs for now + +* Thu Jul 22 2010 David Malcolm - 2.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Tue Jul 13 2010 Thomas Moschny - 2.5-1 +- Update to upstream version 2.5. +- Create python3 subpackage. +- Minor specfile fixes. +- Add examples directory. +- Thanks to Gareth Armstrong for additional hints. + +* Wed Apr 21 2010 Thomas Moschny - 2.4.1-1 +- Update to 2.4.1. + +* Tue Apr 13 2010 Thomas Moschny - 2.4-1 +- Update to 2.4. + +* Tue Feb 23 2010 Thomas Moschny - 2.3.1-1 +- Update to 2.3.1. +- Docs are built using Sphinx now. +- Run the testsuite. + +* Sat Sep 19 2009 Thomas Moschny - 2.2.1-1 +- Update to 2.2.1, mainly a bugfix release. +- Remove patch no longer needed. +- Remove conditional for FC-8. +- Compilation of speedup module has to be explicitly requested now. + +* Sun Jul 26 2009 Fedora Release Engineering - 2.1.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Feb 26 2009 Fedora Release Engineering - 2.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Sat Jan 10 2009 Thomas Moschny - 2.1.1-1 +- Update to 2.1.1 (bugfix release). + +* Thu Dec 18 2008 Thomas Moschny - 2.1-1 +- Update to 2.1, which fixes a number of bugs. + See http://jinja.pocoo.org/2/documentation/changelog#version-2-1. + +* Sat Nov 29 2008 Ignacio Vazquez-Abrams - 2.0-3 +- Rebuild for Python 2.6 + +* Tue Jul 22 2008 Thomas Moschny - 2.0-2 +- Use rpm buildroot macro instead of RPM_BUILD_ROOT. + +* Sun Jul 20 2008 Thomas Moschny - 2.0-1 +- Upstream released 2.0. + +* Sun Jun 29 2008 Thomas Moschny - 2.0-0.1.rc1 +- Modified specfile from the existing python-jinja package.