1- %global srcname beautifulsoup4
2- %global _description %{expand:
3- Beautiful Soup is a Python HTML/XML parser designed for quick
4- turnaround projects like screen-scraping. Three features make it
5- powerful:
6- Beautiful Soup won't choke if you give it bad markup.
7- Beautiful Soup provides a few simple methods and Pythonic idioms for
8- Beautiful Soup automatically converts incoming documents to Unicode
9- and outgoing documents to UTF-8.
10- Beautiful Soup parses anything you give it.
11- Valuable data that was once locked up in poorly-designed websites is
12- now within your reach. Projects that would have taken hours take only
13- minutes with Beautiful Soup.}
14-
151# Ciruclar dependency with soupsieve which must be disabled at times
16- %bcond_without soupsieve
2+ %bcond soupsieve 1
3+ %bcond tests 1
4+
5+ Name: python-beautifulsoup4
6+ Version: 4.12.3
7+ Release: 8%{?dist }
178Summary: HTML/XML parser for quick-turnaround applications like screen-scraping
18- Name: python-%{srcname }
19- Version: 4.11.2
20- Release: 2%{?dist }
219License: MIT
2210Vendor: Microsoft Corporation
2311Distribution: Azure Linux
2412URL: https://www.crummy.com/software/BeautifulSoup/
25- Source0: https://files.pythonhosted.org/packages/source/b/%{srcname }/%{srcname }-%{version }.tar.gz#/%{name}-%{version}.tar.gz
13+ Source0: https://files.pythonhosted.org/packages/source/b/beautifulsoup4/beautifulsoup4-%{version }.tar.gz#/%{name}-%{version}.tar.gz
14+ # https://git.launchpad.net/beautifulsoup/commit/?id=9786a62726de5a8caba10021c4d4a58c8a3e9e3f
15+
16+ Patch0: soupsieve26.patch
17+
2618BuildArch: noarch
19+ # html5lib BR just for test coverage
20+ %if %{with tests }
21+ BuildRequires: python3-html5lib
22+ BuildRequires: python3-lxml
23+ %endif
2724BuildRequires: python3-devel
2825BuildRequires: python3-setuptools
29- %if %{with soupsieve }
26+ BuildRequires: python3-pip
3027BuildRequires: python3-pytest
28+ BuildRequires: python3-wheel
29+ BuildRequires: python3-hatchling
30+ BuildRequires: python3-pathspec
31+ BuildRequires: python3-trove-classifiers
32+ BuildRequires: python3-tox
33+ BuildRequires: python-filelock
34+ BuildRequires: python3-toml
35+ BuildRequires: python3-virtualenv
36+ BuildRequires: python3-colorama
37+ BuildRequires: python3-chardet
38+ BuildRequires: python-cachetools
39+ BuildRequires: python3-pyproject-api
40+ %if %{with soupsieve }
41+ BuildRequires: python3-packaging
3142BuildRequires: python3-soupsieve
3243%endif
33- BuildRequires: python3-lxml
34- # html5lib BR just for test coverage
35- %if 0%{?with_check }
36- BuildRequires: python3-html5lib
37- %endif
44+
45+ %global _description %{expand:
46+ Beautiful Soup is a Python HTML/XML parser designed for quick
47+ turnaround projects like screen-scraping. Three features make it
48+ powerful:
49+
50+ Beautiful Soup won't choke if you give it bad markup.
51+
52+ Beautiful Soup provides a few simple methods and Pythonic idioms for
53+ navigating, searching, and modifying a parse tree.
54+
55+ Beautiful Soup automatically converts incoming documents to Unicode
56+ and outgoing documents to UTF-8.
57+
58+ Beautiful Soup parses anything you give it.
59+
60+ Valuable data that was once locked up in poorly-designed websites is
61+ now within your reach. Projects that would have taken hours take only
62+ minutes with Beautiful Soup.}
3863
3964%description %_description
4065
@@ -50,32 +75,75 @@ Obsoletes: python3-BeautifulSoup < 1:3.2.1-2
5075%description -n python3-beautifulsoup4 %_description
5176
5277%prep
53- %autosetup -n %{srcname }-%{version }
54- rm -rf %{py3dir } && cp -a . %{py3dir }
78+ %autosetup -p1 -n beautifulsoup4-%{version }
79+ # Fix compatibility with lxml 5.3.0
80+ # Reported upstream: https://bugs.launchpad.net/beautifulsoup/+bug/2076897
81+ sed -i " s/strip_cdata=False,//" bs4/builder/_lxml.py
82+
83+ %generate_buildrequires
84+ %pyproject_buildrequires %{?with_tests: -t}
5585
5686%build
57- pushd %{py3dir }
58- %py3_build
87+ %pyproject_wheel
5988
6089%install
61- pushd %{ py3dir }
62- %py3_install
90+ % pyproject_install
91+ %pyproject_save_files bs4
6392
93+ %if %{with tests }
6494%check
65- %py3_check_import bs4
66- pushd %{py3dir }
67- python3 -m unittest discover -s bs4 || :
95+ python3 -m tox -q --recreate -e py312
96+ %endif
6897
6998%files -n python3-beautifulsoup4
7099%license LICENSE
71- %doc NEWS.txt
72- %{python3_sitelib }/beautifulsoup4-%{version }* .egg -info
100+ %doc NEWS.txt CHANGELOG
101+ %{python3_sitelib }/beautifulsoup4-%{version }.dist -info/
73102%{python3_sitelib }/bs4
74103
75104%changelog
76- * Wed Mar 08 2023 Sumedh Sharma <sumsharma@microsoft.com> - 4.11.2-2
77- - Initial CBL-Mariner import from Fedora 38 (license: MIT)
78- - license verified
105+ * Fri Mar 21 2025 Jyoti kanase <v-jykanase@microsoft.com> - 4.12.3-8
106+ - Initial Azure Linux import from Fedora 41 (license: MIT).
107+ - License verified.
108+
109+ * Tue Aug 13 2024 Lumír Balhar <lbalhar@redhat.com> - 4.12.3-7
110+ - Fix compatibility with lxml 5.3.0
111+
112+ * Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.12.3-6
113+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
114+
115+ * Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 4.12.3-5
116+ - Rebuilt for Python 3.13
117+
118+ * Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 4.12.3-4
119+ - Bootstrap for Python 3.13
120+
121+ * Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.12.3-3
122+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
123+
124+ * Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.12.3-2
125+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
126+
127+ * Wed Jan 17 2024 Terje Rosten <terje.rosten@ntnu.no> - 4.12.3-1
128+ - 4.12.3
129+
130+ * Sat Dec 16 2023 Terje Rosten <terje.rosten@ntnu.no> - 4.12.2-5
131+ - Add patch from upstream to fix test issue with libxml2 2.12.1 (bz#2251911)
132+
133+ * Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.12.2-4
134+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
135+
136+ * Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 4.12.2-3
137+ - Rebuilt for Python 3.12
138+
139+ * Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 4.12.2-2
140+ - Bootstrap for Python 3.12
141+
142+ * Thu Apr 13 2023 Terje Rosten <terje.rosten@ntnu.no> - 4.12.2-1
143+ - 4.12.2
144+
145+ * Mon Mar 20 2023 Terje Rosten <terje.rosten@ntnu.no> - 4.12.0-1
146+ - 4.12.0
79147
80148* Thu Feb 02 2023 Terje Rosten <terje.rosten@ntnu.no> - 4.11.2-1
81149- 4.11.2
@@ -285,3 +353,4 @@ python3 -m unittest discover -s bs4 || :
285353
286354* Sat Mar 24 2012 Terje Rosten <terje.rosten@ntnu.no> - 4.0.1-1
287355- initial package based on python-BeautifulSoup.
356+
0 commit comments