[Django/f17] fix ftbfs on python 2.7.3
Matthias Runge
mrunge at fedoraproject.org
Wed May 30 19:44:20 UTC 2012
commit 6a9daafa5326126006402673eed315908fa64bc5
Author: Matthias Runge <mrunge at matthias-runge.de>
Date: Wed May 30 21:43:52 2012 +0200
fix ftbfs on python 2.7.3
...-Removed-an-HTMLParser-test-that-doesn-t-.patch | 28 ++++++++++++++++++++
Django.spec | 12 +++++++-
2 files changed, 38 insertions(+), 2 deletions(-)
---
diff --git a/Django-0001-Fixed-18027-Removed-an-HTMLParser-test-that-doesn-t-.patch b/Django-0001-Fixed-18027-Removed-an-HTMLParser-test-that-doesn-t-.patch
new file mode 100644
index 0000000..31091b4
--- /dev/null
+++ b/Django-0001-Fixed-18027-Removed-an-HTMLParser-test-that-doesn-t-.patch
@@ -0,0 +1,28 @@
+From 5a4d7e63ceb5d1a987c3466e3c6b0149eff5e222 Mon Sep 17 00:00:00 2001
+From: Claude Paroz <claude at 2xlibre.net>
+Date: Wed, 11 Apr 2012 21:25:22 +0000
+Subject: [PATCH] Fixed #18027 -- Removed an HTMLParser test that doesn't
+ raise any more in recent Python versions. Thanks Arfever
+ and Anssi Kaariainen for the report and the patch.
+
+git-svn-id: http://code.djangoproject.com/svn/django/trunk@17900 bcc190cf-cafb-0310-a4f2-bffc1f526a37
+---
+ tests/regressiontests/test_utils/tests.py | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/tests/regressiontests/test_utils/tests.py b/tests/regressiontests/test_utils/tests.py
+index 3afce90..2192404 100644
+--- a/tests/regressiontests/test_utils/tests.py
++++ b/tests/regressiontests/test_utils/tests.py
+@@ -422,8 +422,6 @@ class HTMLEqualTests(TestCase):
+ self.assertHTMLEqual('', '<p>')
+ with self.assertRaises(HTMLParseError):
+ parse_html('</p>')
+- with self.assertRaises(HTMLParseError):
+- parse_html('<!--')
+
+ def test_contains_html(self):
+ response = HttpResponse('''<body>
+--
+1.7.10.2
+
diff --git a/Django.spec b/Django.spec
index f3da1d1..0f1d691 100644
--- a/Django.spec
+++ b/Django.spec
@@ -1,5 +1,5 @@
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")}
+%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:5]")}
# Tests requiring Internet connections are disabled by default
# pass --with internet to run them (e.g. when doing a local rebuild
@@ -8,7 +8,7 @@
Name: Django
Version: 1.4
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A high-level Python Web framework
Group: Development/Languages
@@ -20,6 +20,9 @@ Source1: simplejson-init.py
Patch0: Django-1.4-no-internet-connection-tests.patch
# patch tests to relax performance scalability requirements
Patch1: Django-1.4-relax-scalability-req.patch
+# https://code.djangoproject.com/ticket/18027
+Patch2: Django-0001-Fixed-18027-Removed-an-HTMLParser-test-that-doesn-t-.patch
+
%if 0%{?rhel} <= 5
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -65,6 +68,8 @@ Python Web framework.
%endif
# patch tests to relax performance scalability requirements
%patch1 -p1 -b .relax-scalability-req
+# patch test which (correctly, as it turns) doesn't fail on Python 2.7.3
+%patch2 -p1 -b .missing-HTML-comment-end
# empty files
for f in \
@@ -254,6 +259,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Wed May 30 2012 Matthias Runge <mrunge at matthias-runge.de> - 1.4-3
+- fix for FTBFS using python 2.7.3 (thanks to M.Cepl)
+
* Sun Apr 01 2012 Matthias Runge <mrunge at matthias-runge.de> - 1.4-2
- include forgotten %%bcond_with internet
- fix language handling for el6
More information about the scm-commits
mailing list