summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Schwendt <mschwendt@fedoraproject.org>2013-03-09 12:11:51 +0100
committerMichael Schwendt <mschwendt@fedoraproject.org>2013-03-09 12:11:51 +0100
commit747a33b7d9f45d23c9190a3432a2860221a4aaee (patch)
treef7780f049216fdcbbce49abf26db5d97d55be582
parenta77879b166c2e52b9cc3cfe6d05b098e71fd6609 (diff)
downloadpython-feedparser-747a33b7d9f45d23c9190a3432a2860221a4aaee.zip
python-feedparser-747a33b7d9f45d23c9190a3432a2860221a4aaee.tar.gz
python-feedparser-747a33b7d9f45d23c9190a3432a2860221a4aaee.tar.xz
Update to 5.1.3 (50k diff).
- Patch test-suite minimally for python3 to show that it fails early. - Fix file permissions and line delimiters at end of %prep section. - Fix python3 sitelib path in %check section.
-rw-r--r--.gitignore1
-rw-r--r--feedparser-5.1.3-tests-py3.patch33
-rw-r--r--python-feedparser.spec32
-rw-r--r--sources2
4 files changed, 61 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index a2765a1..9e63f36 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ feedparser-4.1.zip
/feedparser-5.0.1.tar.bz2
/feedparser-5.1.tar.bz2
/feedparser-5.1.2.tar.bz2
+/feedparser-5.1.3.tar.bz2
diff --git a/feedparser-5.1.3-tests-py3.patch b/feedparser-5.1.3-tests-py3.patch
new file mode 100644
index 0000000..c6cf4bc
--- /dev/null
+++ b/feedparser-5.1.3-tests-py3.patch
@@ -0,0 +1,33 @@
+diff -Nur feedparser-5.1.3-orig/feedparser/feedparsertest.py feedparser-5.1.3/feedparser/feedparsertest.py
+--- feedparser-5.1.3-orig/feedparser/feedparsertest.py 2012-12-09 17:18:06.000000000 +0100
++++ feedparser-5.1.3/feedparser/feedparsertest.py 2013-03-09 11:38:04.664372770 +0100
+@@ -163,9 +163,9 @@
+ try:
+ if not eval(evalString, globals(), env):
+ failure=(msg or 'not eval(%s) \nWITH env(%s)' % (evalString, pprint.pformat(env)))
+- raise self.failureException, failure
++ raise self.failureException(failure)
+ if not everythingIsUnicode(env):
+- raise self.failureException, "not everything is unicode \nWITH env(%s)" % (pprint.pformat(env), )
++ raise self.failureException("not everything is unicode \nWITH env(%s)" % (pprint.pformat(env), ))
+ except SyntaxError:
+ # Python 3 doesn't have the `u""` syntax, so evalString needs to be modified,
+ # which will require the failure message to be updated
+@@ -173,7 +173,7 @@
+ evalString = re.sub(unicode2_re, _s2bytes(' "'), evalString)
+ if not eval(evalString, globals(), env):
+ failure=(msg or 'not eval(%s) \nWITH env(%s)' % (evalString, pprint.pformat(env)))
+- raise self.failureException, failure
++ raise self.failureException(failure)
+
+ class BaseTestCase(unittest.TestCase):
+ failUnlessEval = failUnlessEval
+@@ -742,7 +742,7 @@
+ skipUnless = '1'
+ search_results = desc_re.search(data)
+ if not search_results:
+- raise RuntimeError, "can't parse %s" % xmlfile
++ raise RuntimeError("can't parse %s" % xmlfile)
+ description, evalString = map(lambda s: s.strip(), list(search_results.groups()))
+ description = xmlfile + ": " + unicode(description, 'utf8')
+ return description, evalString, skipUnless
diff --git a/python-feedparser.spec b/python-feedparser.spec
index 1e2867e..e0b7ef5 100644
--- a/python-feedparser.spec
+++ b/python-feedparser.spec
@@ -7,14 +7,15 @@
%global srcname feedparser
Name: python-feedparser
-Version: 5.1.2
-Release: 6%{?dist}
+Version: 5.1.3
+Release: 1%{?dist}
Summary: Parse RSS and Atom feeds in Python
Group: Development/Languages
License: BSD
URL: http://code.google.com/p/feedparser/
Source0: http://feedparser.googlecode.com/files/feedparser-%{version}.tar.bz2
+# only for EPEL5
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -22,12 +23,17 @@ BuildRequires: python-devel
BuildRequires: python-setuptools
## TODO: Decide on these, also with regard to explicit "Requires".
-## Optional imports at run-time and influence the test-suite, too.
+## Optional imports at run-time and influence the test-suite, too,
+## and causes additional tests to fail.
#BuildRequires: python-BeautifulSoup
#BuildRequires: python-chardet
## the preferred XML parser
#BuildRequires: libxml2-python
+# shows that for Python 3 the test-suite fails early with
+# ImportError: No module named 'BaseHTTPServer'
+Patch0: feedparser-5.1.3-tests-py3.patch
+
%description
Universal Feed Parser is a Python module for downloading and parsing
@@ -52,12 +58,16 @@ modules, including Dublin Core and Apple's iTunes extensions.
%prep
%setup -q -n %{srcname}-%{version}
-find -type f -exec sed -i 's/\r//' {} ';'
-find -type f -exec chmod 0644 {} ';'
%if 0%{?with_python3}
cp -a . %{py3dir}
+pushd %{py3dir}
+%patch0 -p1
+popd
%endif
+find -type f -exec sed -i 's/\r//' {} ';'
+find -type f -exec chmod 0644 {} ';'
+
%build
%{__python} setup.py build
@@ -69,7 +79,9 @@ popd
%install
+# only for EPEL5
rm -rf %{buildroot}
+
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
%if 0%{?with_python3}
pushd %{py3dir}
@@ -84,11 +96,12 @@ PYTHONPATH=%{buildroot}%{python_sitelib} %{__python} feedparsertest.py || :
popd
%if 0%{?with_python3}
pushd %{py3dir}/feedparser
-PYTHONPATH=%{buildroot}%{python_sitelib} %{__python3} feedparsertest.py || :
+PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} feedparsertest.py || :
popd
%endif
+# only for EPEL5
%clean
rm -rf %{buildroot}
@@ -104,7 +117,14 @@ rm -rf %{buildroot}
%{python3_sitelib}/*
%endif
+
%changelog
+* Sat Mar 9 2013 Michael Schwendt <mschwendt@fedoraproject.org> - 5.1.3-1
+- Update to 5.1.3 (50k diff).
+- Patch test-suite minimally for python3 to show that it fails early.
+- Fix file permissions and line delimiters at end of %%prep section.
+- Fix python3 sitelib path in %%check section.
+
* Fri Mar 8 2013 Michael Schwendt <mschwendt@fedoraproject.org>
- Update URL to new location at Google code (#880138).
diff --git a/sources b/sources
index 9c33f6d..584dbe8 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-9f88692c7c1af1d47839eb2025984975 feedparser-5.1.2.tar.bz2
+6fb6372a1dc2f56d4d79d740b8f49f25 feedparser-5.1.3.tar.bz2