forked from pool/python-beautifulsoup4
Accepting request 213193 from devel:languages:python
- Add beautifulsoup4-lxml-fixes.patch: LXML fixes OBS-URL: https://build.opensuse.org/request/show/213193 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-beautifulsoup4?expand=0&rev=13
This commit is contained in:
23
beautifulsoup4-lxml-fixes.patch
Normal file
23
beautifulsoup4-lxml-fixes.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
diff -ruN a/bs4/testing.py b/bs4/testing.py
|
||||
--- a/bs4/testing.py 2013-06-10 15:16:25.000000000 +0200
|
||||
+++ b/bs4/testing.py 2014-01-08 16:09:35.845681062 +0100
|
||||
@@ -493,7 +493,7 @@
|
||||
self.assertTrue(b"< < hey > >" in encoded)
|
||||
|
||||
def test_can_parse_unicode_document(self):
|
||||
- markup = u'<?xml version="1.0" encoding="euc-jp"><root>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</root>'
|
||||
+ markup = u'<?xml version="1.0""><root>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</root>'
|
||||
soup = self.soup(markup)
|
||||
self.assertEqual(u'Sacr\xe9 bleu!', soup.root.string)
|
||||
|
||||
diff -ruN a/bs4/tests/test_lxml.py b/bs4/tests/test_lxml.py
|
||||
--- a/bs4/tests/test_lxml.py 2013-08-19 16:29:42.000000000 +0200
|
||||
+++ b/bs4/tests/test_lxml.py 2014-01-08 16:10:33.157497450 +0100
|
||||
@@ -61,6 +61,7 @@
|
||||
# Make sure that the deprecated BSS class uses an xml builder
|
||||
# if one is installed.
|
||||
with warnings.catch_warnings(record=True) as w:
|
||||
+ warnings.simplefilter("always")
|
||||
soup = BeautifulStoneSoup("<b />")
|
||||
self.assertEqual(u"<b/>", unicode(soup.b))
|
||||
self.assertTrue("BeautifulStoneSoup class is deprecated" in str(w[0].message))
|
||||
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 8 15:05:55 UTC 2014 - speilicke@suse.com
|
||||
|
||||
- Add beautifulsoup4-lxml-fixes.patch: LXML fixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 22 13:00:00 UTC 2013 - toddrme2178@gmail.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-beautifulsoup4
|
||||
#
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -24,6 +24,8 @@ License: MIT
|
||||
Group: Development/Libraries/Python
|
||||
Url: http://www.crummy.com/software/BeautifulSoup/
|
||||
Source: http://pypi.python.org/packages/source/b/beautifulsoup4/beautifulsoup4-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM speilicke@suse.com -- Backport of https://code.launchpad.net/~saschpe/beautifulsoup/beautifulsoup/+merge/200849
|
||||
Patch0: beautifulsoup4-lxml-fixes.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: python-devel >= 2.6
|
||||
BuildRequires: python-html5lib
|
||||
@@ -75,14 +77,13 @@ Recommends: %{name} = %{version}
|
||||
%description doc
|
||||
Documentation and help files for %{name}
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n beautifulsoup4-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
cd doc && make html
|
||||
rm build/html/.buildinfo
|
||||
cd doc && make html && rm build/html/.buildinfo
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
|
||||
Reference in New Issue
Block a user