[packages/python-bs4] - updated to 4.9.3 - removed obsolete lxml patch

qboosh qboosh at pld-linux.org
Tue Sep 13 18:33:36 CEST 2022


commit 2a80d360ae1b30e9caca286d650dce60bda656ab
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Sep 13 18:33:53 2022 +0200

    - updated to 4.9.3
    - removed obsolete lxml patch

 python-bs4-lxml.patch | 14 --------------
 python-bs4.spec       | 45 ++++++++++++++++++++++++++++++++++-----------
 2 files changed, 34 insertions(+), 25 deletions(-)
---
diff --git a/python-bs4.spec b/python-bs4.spec
index 0fd4923..70600a9 100644
--- a/python-bs4.spec
+++ b/python-bs4.spec
@@ -9,15 +9,15 @@
 Summary:	beautifulsoup4 - Screen-scraping library
 Summary(pl.UTF-8):	beautifulsoup4 - biblioteka przechwytująca wyjście
 Name:		python-%{module}
-Version:	4.6.3
-Release:	4
+# keep 4.9.x here for python2 support
+Version:	4.9.3
+Release:	1
 License:	MIT
 Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/beautifulsoup4/
 Source0:	https://files.pythonhosted.org/packages/source/b/beautifulsoup4/beautifulsoup4-%{version}.tar.gz
-# Source0-md5:	a08ea866a5c508d9b4c28c4d21e05df8
+# Source0-md5:	57fd468ae3eb055f6871106e8f7813e2
 Patch0:		test_suite.patch
-Patch1:		%{name}-lxml.patch
 Patch2:		%{name}-smart_quotes.patch
 URL:		https://www.crummy.com/software/BeautifulSoup/
 BuildRequires:	rpmbuild(macros) >= 1.714
@@ -25,13 +25,16 @@ BuildRequires:	rpm-pythonprov
 %if %{with python2}
 BuildRequires:	python-modules >= 1:2.7
 BuildRequires:	python-setuptools
+BuildRequires:	python-soupsieve >= 1.2
 %endif
 %if %{with python3}
+BuildRequires:	python3-2to3 >= 1:3.2
 BuildRequires:	python3-modules >= 1:3.2
 BuildRequires:	python3-setuptools
+BuildRequires:	python3-soupsieve >= 1.2
 %endif
 %if %{with doc}
-BuildRequires:	sphinx-pdg
+BuildRequires:	sphinx-pdg-2
 %endif
 Requires:	python-modules >= 1:2.7
 BuildArch:	noarch
@@ -75,20 +78,35 @@ Dokumentacja API modułu Pythona beautifulsoup4.
 %prep
 %setup -q -n beautifulsoup4-%{version}
 %patch0 -p1
-%patch1 -p1
 %patch2 -p1
 
+# no longer supported by setuptools
+%{__sed} -i -e '/use_2to3/d' setup.py
+
 %build
 %if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
+
+%if %{with tests}
+%{__python} -m unittest discover -s bs4
+%endif
 %endif
 
 %if %{with python3}
-%py3_build %{?with_tests:test}
+%py3_build
+
+2to3-%{py3_ver} --no-diffs -n -w build-3/lib
+
+%if %{with tests}
+cd build-3/lib
+%{__python3} -m unittest discover -s bs4
+cd ../..
+%endif
 %endif
 
 %if %{with doc}
-%{__make} -C doc html
+%{__make} -C doc html \
+	SPHINXBUILD=sphinx-build-2
 %endif
 
 %install
@@ -96,10 +114,15 @@ rm -rf $RPM_BUILD_ROOT
 
 %if %{with python2}
 %py_install
+
+%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/bs4/tests
+%py_postclean
 %endif
 
 %if %{with python3}
 %py3_install
+
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/bs4/tests
 %endif
 
 %clean
@@ -108,7 +131,7 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS.txt COPYING.txt NEWS.txt README.md TODO.txt
+%doc COPYING.txt NEWS.txt README.md TODO.txt
 %{py_sitescriptdir}/bs4
 %{py_sitescriptdir}/beautifulsoup4-%{version}-py*.egg-info
 %endif
@@ -116,7 +139,7 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python3}
 %files -n python3-%{module}
 %defattr(644,root,root,755)
-%doc AUTHORS.txt COPYING.txt NEWS.txt README.md TODO.txt
+%doc COPYING.txt NEWS.txt README.md TODO.txt
 %{py3_sitescriptdir}/bs4
 %{py3_sitescriptdir}/beautifulsoup4-%{version}-py*.egg-info
 %endif
diff --git a/python-bs4-lxml.patch b/python-bs4-lxml.patch
deleted file mode 100644
index 4a2ce43..0000000
--- a/python-bs4-lxml.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- beautifulsoup4-4.6.0/bs4/element.py.orig	2017-05-07 14:15:39.000000000 +0200
-+++ beautifulsoup4-4.6.0/bs4/element.py	2021-01-23 20:55:10.229088076 +0100
-@@ -29,6 +29,11 @@
- class NamespacedAttribute(unicode):
- 
-     def __new__(cls, prefix, name, namespace=None):
-+        if not name:
-+            # This is the default namespace. Its name "has no value"
-+            # per https://www.w3.org/TR/xml-names/#defaulting
-+            name = None
-+
-         if name is None:
-             obj = unicode.__new__(cls, prefix)
-         elif prefix is None:
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-bs4.git/commitdiff/2a80d360ae1b30e9caca286d650dce60bda656ab



More information about the pld-cvs-commit mailing list