[python-cheetah] - update to the 2.4.3 release - fix compatibility with Python 2.7
Mike Bonnet
mikeb at fedoraproject.org
Mon Oct 18 19:52:10 UTC 2010
commit 3d6b2907bb4f6b9ecb1ca01975706841c99164a0
Author: Mike Bonnet <mikeb at redhat.com>
Date: Mon Oct 18 15:51:48 2010 -0400
- update to the 2.4.3 release
- fix compatibility with Python 2.7
.gitignore | 1 +
cheetah-2.4-avoid-setuptools-warning.patch | 10 +++++++
cheetah-2.4-python2.7-compat.patch | 36 ++++++++++++++++++++++++++++
cheetah-2.4-test-retcode.patch | 13 ++++++++++
python-cheetah.spec | 19 ++++++++++++--
sources | 2 +-
6 files changed, 77 insertions(+), 4 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0c60abf..f01165f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
Cheetah-2.4.2.1.tar.gz
+/Cheetah-2.4.3.tar.gz
diff --git a/cheetah-2.4-avoid-setuptools-warning.patch b/cheetah-2.4-avoid-setuptools-warning.patch
new file mode 100644
index 0000000..067d433
--- /dev/null
+++ b/cheetah-2.4-avoid-setuptools-warning.patch
@@ -0,0 +1,10 @@
+diff -uNr Cheetah-2.4.2.1.orig/SetupConfig.py Cheetah-2.4.2.1/SetupConfig.py
+--- Cheetah-2.4.2.1.orig/SetupConfig.py 2010-02-07 23:17:23.000000000 -0500
++++ Cheetah-2.4.2.1/SetupConfig.py 2010-10-15 17:51:09.128340922 -0400
+@@ -29,6 +29,7 @@
+ Topic :: Software Development :: Libraries :: Python Modules
+ Topic :: Software Development :: User Interfaces
+ Topic :: Text Processing'''.splitlines() if not line.strip().startswith('#')]
++del line
+
+ package_dir = {'Cheetah':'cheetah'}
diff --git a/cheetah-2.4-python2.7-compat.patch b/cheetah-2.4-python2.7-compat.patch
new file mode 100644
index 0000000..c455c73
--- /dev/null
+++ b/cheetah-2.4-python2.7-compat.patch
@@ -0,0 +1,36 @@
+diff -uNr Cheetah-2.4.2.1.orig/cheetah/Template.py Cheetah-2.4.2.1/cheetah/Template.py
+--- Cheetah-2.4.2.1.orig/cheetah/Template.py 2010-02-07 23:17:23.000000000 -0500
++++ Cheetah-2.4.2.1/cheetah/Template.py 2010-10-18 14:06:54.439935114 -0400
+@@ -32,7 +32,7 @@
+
+ filetype = None
+
+-if isinstance(sys.version_info, tuple):
++if isinstance(sys.version_info[:], tuple):
+ # Python 2.xx
+ filetype = types.FileType
+ def createMethod(func, cls):
+diff -uNr Cheetah-2.4.2.1.orig/cheetah/Tests/SyntaxAndOutput.py Cheetah-2.4.2.1/cheetah/Tests/SyntaxAndOutput.py
+--- Cheetah-2.4.2.1.orig/cheetah/Tests/SyntaxAndOutput.py 2010-10-18 15:00:44.668935001 -0400
++++ Cheetah-2.4.2.1/cheetah/Tests/SyntaxAndOutput.py 2010-10-18 14:43:56.500934997 -0400
+@@ -847,17 +847,17 @@
+ def test10(self):
+ r"""func placeholder - with ('''\nstring\n''')"""
+ self.verify("$aFunc('''\naoeu\n''')",
+- "\naoeu\n")
++ "\naoeu\n", convertEOLs=False)
+
+ def test11(self):
+ r"""func placeholder - with ('''\nstring'\n''')"""
+ self.verify("$aFunc('''\naoeu'\n''')",
+- "\naoeu'\n")
++ "\naoeu'\n", convertEOLs=False)
+
+ def test12(self):
+ r'''func placeholder - with ("""\nstring\n""")'''
+ self.verify('$aFunc("""\naoeu\n""")',
+- "\naoeu\n")
++ "\naoeu\n", convertEOLs=False)
+
+ def test13(self):
+ """func placeholder - with (string*int)"""
diff --git a/cheetah-2.4-test-retcode.patch b/cheetah-2.4-test-retcode.patch
new file mode 100644
index 0000000..072070d
--- /dev/null
+++ b/cheetah-2.4-test-retcode.patch
@@ -0,0 +1,13 @@
+diff -uNr Cheetah-2.4.2.1.orig/cheetah/CheetahWrapper.py Cheetah-2.4.2.1/cheetah/CheetahWrapper.py
+--- Cheetah-2.4.2.1.orig/cheetah/CheetahWrapper.py 2010-01-03 17:13:06.000000000 -0500
++++ Cheetah-2.4.2.1/cheetah/CheetahWrapper.py 2010-10-18 14:59:44.722934490 -0400
+@@ -263,7 +263,8 @@
+ if '-v' in self.testOpts:
+ verbosity = 2
+ runner = unittest.TextTestRunner(verbosity=verbosity)
+- runner.run(unittest.TestSuite(Test.suites))
++ results = runner.run(unittest.TestSuite(Test.suites))
++ sys.exit(int(not results.wasSuccessful()))
+
+ def version(self):
+ print(Version)
diff --git a/python-cheetah.spec b/python-cheetah.spec
index cdfd773..12580af 100644
--- a/python-cheetah.spec
+++ b/python-cheetah.spec
@@ -1,8 +1,8 @@
%{!?python_sitearch: %global python_sitearch %([ -x %{__python} ] && %{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" || :)}
Name: python-cheetah
-Version: 2.4.2.1
-Release: 2%{?dist}
+Version: 2.4.3
+Release: 1%{?dist}
Summary: Template engine and code generator
Group: Development/Libraries
@@ -10,6 +10,10 @@ License: MIT
URL: http://cheetahtemplate.org/
Source: http://pypi.python.org/packages/source/C/Cheetah/Cheetah-%{version}.tar.gz
+Patch0: cheetah-2.4-python2.7-compat.patch
+Patch1: cheetah-2.4-test-retcode.patch
+Patch2: cheetah-2.4-avoid-setuptools-warning.patch
+
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: python
@@ -30,6 +34,9 @@ code, Java, sql, form emails and even Python code.
%prep
%setup -q -n Cheetah-%{version}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
# remove unnecessary shebang lines to silence rpmlint
%{__sed} -i -e '/^#!/,1d' cheetah/Tests/* \
cheetah/DirectiveAnalyzer.py cheetah/Utils/Misc.py
@@ -44,7 +51,7 @@ rm -rf %{buildroot}
%check
export PATH="%{buildroot}/%{_bindir}:$PATH"
export PYTHONPATH="%{buildroot}/%{python_sitearch}"
-%{__python} %{buildroot}/%{python_sitearch}/Cheetah/Tests/Test.py
+%{buildroot}/%{_bindir}/cheetah test
%clean
rm -rf %{buildroot}
@@ -83,6 +90,12 @@ rm -rf %{buildroot}
%{python_sitearch}/Cheetah-%{version}-*.egg-info/*.txt
%changelog
+* Mon Oct 18 2010 Mike Bonnet <mikeb at redhat.com> - 2.4.3-1
+- update to the 2.4.3 release
+
+* Mon Oct 18 2010 Mike Bonnet <mikeb at redhat.com> - 2.4.2.1-3
+- Fix compatibility with Python 2.7
+
* Wed Jul 21 2010 David Malcolm <dmalcolm at redhat.com> - 2.4.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
diff --git a/sources b/sources
index b5425eb..b26061f 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-f58ab28548b6e4000c6f4d3b14307187 Cheetah-2.4.2.1.tar.gz
+e9d12e6aeb3b51b75a9b4214f698def8 Cheetah-2.4.3.tar.gz
More information about the scm-commits
mailing list