[packages/python3-bs4] - up to 4.13.2

baggins baggins at pld-linux.org
Tue Mar 11 18:28:22 CET 2025


commit 6f084cebc6d9fc5a4bf9eb0d7620ef28038d4fe9
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Tue Mar 11 19:03:44 2025 +0100

    - up to 4.13.2

 python-bs4-smart_quotes.patch |  11 ---
 python-bs4.spec               | 151 ------------------------------------------
 python3-bs4.spec              |  90 +++++++++++++++++++++++++
 test_suite.patch              |   9 ---
 4 files changed, 90 insertions(+), 171 deletions(-)
---
diff --git a/python-bs4.spec b/python-bs4.spec
deleted file mode 100644
index 919f57d..0000000
--- a/python-bs4.spec
+++ /dev/null
@@ -1,151 +0,0 @@
-#
-# Conditional build:
-%bcond_without	doc	# Sphinx documentation
-%bcond_without	tests	# unit tests
-%bcond_without	python2 # CPython 2.x module
-%bcond_without	python3 # CPython 3.x module
-
-%define 	module	bs4
-Summary:	beautifulsoup4 - Screen-scraping library
-Summary(pl.UTF-8):	beautifulsoup4 - biblioteka przechwytująca wyjście
-Name:		python-%{module}
-# keep 4.9.x here for python2 support
-Version:	4.9.3
-Release:	2
-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:	57fd468ae3eb055f6871106e8f7813e2
-Patch0:		test_suite.patch
-Patch2:		%{name}-smart_quotes.patch
-URL:		https://www.crummy.com/software/BeautifulSoup/
-BuildRequires:	rpmbuild(macros) >= 1.714
-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-2
-%endif
-Requires:	python-modules >= 1:2.7
-BuildArch:	noarch
-BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-Beautiful Soup sits atop an HTML or XML parser, providing Pythonic
-idioms for iterating, searching, and modifying the parse tree.
-
-%description -l pl.UTF-8
-Beautiful Soup rezyduje powyżej parsera HTML lub XML, zapewniając
-pythonowe idiomy do iterowania, wyszukiwania i modyfikowania drzewa
-analizy.
-
-%package -n python3-%{module}
-Summary:	beautifulsoup4 - Screen-scraping library
-Summary(pl.UTF-8):	beautifulsoup4 - biblioteka przechwytująca wyjście
-Group:		Libraries/Python
-Requires:	python3-modules >= 1:3.2
-
-%description -n python3-%{module}
-Beautiful Soup sits atop an HTML or XML parser, providing Pythonic
-idioms for iterating, searching, and modifying the parse tree.
-
-%description -n python3-%{module} -l pl.UTF-8
-Beautiful Soup rezyduje powyżej parsera HTML lub XML, zapewniając
-pythonowe idiomy do iterowania, wyszukiwania i modyfikowania drzewa
-analizy.
-
-%package apidocs
-Summary:	API documentation for Python beautifulsoup4 module
-Summary(pl.UTF-8):	Dokumentacja API modułu Pythona beautifulsoup4
-Group:		Documentation
-
-%description apidocs
-API documentation for Python beautifulsoup4 module.
-
-%description apidocs -l pl.UTF-8
-Dokumentacja API modułu Pythona beautifulsoup4.
-
-%prep
-%setup -q -n beautifulsoup4-%{version}
-%patch -P 0 -p1
-%patch -P 2 -p1
-
-# no longer supported by setuptools
-%{__sed} -i -e '/use_2to3/d' setup.py
-
-%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-%{__python} -m unittest discover -s bs4
-%endif
-%endif
-
-%if %{with python3}
-%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 \
-	SPHINXBUILD=sphinx-build-2
-%endif
-
-%install
-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
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%files
-%defattr(644,root,root,755)
-%doc COPYING.txt NEWS.txt README.md TODO.txt
-%{py_sitescriptdir}/bs4
-%{py_sitescriptdir}/beautifulsoup4-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-%{module}
-%defattr(644,root,root,755)
-%doc COPYING.txt NEWS.txt README.md TODO.txt
-%{py3_sitescriptdir}/bs4
-%{py3_sitescriptdir}/beautifulsoup4-%{version}-py*.egg-info
-%endif
-
-%if %{with doc}
-%files apidocs
-%defattr(644,root,root,755)
-%doc doc/build/html/{_images,_static,*.html,*.js}
-%endif
diff --git a/python3-bs4.spec b/python3-bs4.spec
new file mode 100644
index 0000000..bceb81b
--- /dev/null
+++ b/python3-bs4.spec
@@ -0,0 +1,90 @@
+#
+# Conditional build:
+%bcond_without	doc	# Sphinx documentation
+%bcond_without	tests	# unit tests
+
+%define		module	bs4
+Summary:	beautifulsoup4 - Screen-scraping library
+Summary(pl.UTF-8):	beautifulsoup4 - biblioteka przechwytująca wyjście
+Name:		python3-%{module}
+Version:	4.13.2
+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:	e5edd9780e91f48901f9c19ce98c5376
+URL:		https://www.crummy.com/software/BeautifulSoup/
+BuildRequires:	python3-build
+BuildRequires:	python3-installer
+BuildRequires:	python3-modules >= 1:3.2
+BuildRequires:	python3-soupsieve >= 1.2
+BuildRequires:	python3-typing_extensions
+BuildRequires:	rpmbuild(macros) >= 1.714
+BuildRequires:	rpm-pythonprov
+%if %{with doc}
+BuildRequires:	sphinx-pdg-3
+%endif
+Requires:	python-modules >= 1:2.7
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Beautiful Soup sits atop an HTML or XML parser, providing Pythonic
+idioms for iterating, searching, and modifying the parse tree.
+
+%description -l pl.UTF-8
+Beautiful Soup rezyduje powyżej parsera HTML lub XML, zapewniając
+pythonowe idiomy do iterowania, wyszukiwania i modyfikowania drzewa
+analizy.
+
+%package apidocs
+Summary:	API documentation for Python beautifulsoup4 module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona beautifulsoup4
+Group:		Documentation
+
+%description apidocs
+API documentation for Python beautifulsoup4 module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona beautifulsoup4.
+
+%prep
+%setup -q -n beautifulsoup4-%{version}
+
+%build
+%py3_build_pyproject
+
+%if %{with tests}
+# use explicit plugins list for reliable builds (delete PYTEST_PLUGINS if empty)
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS= \
+%{__python3} -m pytest bs4/tests
+%endif
+
+%if %{with doc}
+%{__make} -C doc html \
+	SPHINXBUILD=sphinx-build-3
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install_pyproject
+
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/bs4/tests
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS CHANGELOG LICENSE README.md
+%{py3_sitescriptdir}/bs4
+%{py3_sitescriptdir}/beautifulsoup4-%{version}.dist-info
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc doc/_build/html/{_images,_static,*.html,*.js}
+%endif
diff --git a/python-bs4-smart_quotes.patch b/python-bs4-smart_quotes.patch
deleted file mode 100644
index e1399f5..0000000
--- a/python-bs4-smart_quotes.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- beautifulsoup4-4.6.3/bs4/tests/test_soup.py.orig	2016-07-27 03:27:42.000000000 +0200
-+++ beautifulsoup4-4.6.3/bs4/tests/test_soup.py	2022-03-21 18:20:50.490829014 +0100
-@@ -171,7 +171,7 @@ class TestEntitySubstitution(unittest.Te
-         # MS smart quotes are a common source of frustration, so we
-         # give them a special test.
-         quotes = b"\x91\x92foo\x93\x94"
--        dammit = UnicodeDammit(quotes)
-+        dammit = UnicodeDammit(quotes, override_encodings=["windows-1252"])
-         self.assertEqual(self.sub.substitute_html(dammit.markup),
-                           "‘’foo“”")
- 
diff --git a/test_suite.patch b/test_suite.patch
deleted file mode 100644
index a3a357f..0000000
--- a/test_suite.patch
+++ /dev/null
@@ -1,9 +0,0 @@
-diff -dur beautifulsoup4-4.4.1.orig/setup.py beautifulsoup4-4.4.1/setup.py
---- beautifulsoup4-4.4.1.orig/setup.py	2015-09-29 02:11:15.000000000 +0200
-+++ beautifulsoup4-4.4.1/setup.py	2015-11-26 10:42:43.000000000 +0100
-@@ -30,4 +30,5 @@
-                  "Topic :: Text Processing :: Markup :: SGML",
-                  "Topic :: Software Development :: Libraries :: Python Modules",
-              ],
-+    test_suite = "bs4.tests",
- )
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-bs4.git/commitdiff/6f084cebc6d9fc5a4bf9eb0d7620ef28038d4fe9



More information about the pld-cvs-commit mailing list