|
|
|
@ -1,44 +1,35 @@
|
|
|
|
|
# Ciruclar dependency with soupsieve which must be disabled at times
|
|
|
|
|
%bcond_without soupsieve
|
|
|
|
|
%bcond_with tests
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora} < 32 && 0%{?rhel} < 8
|
|
|
|
|
%global py2 1
|
|
|
|
|
%if 0%{?rhel} > 9
|
|
|
|
|
%bcond soupsieve 0
|
|
|
|
|
%bcond tests 0
|
|
|
|
|
%else
|
|
|
|
|
%bcond soupsieve 1
|
|
|
|
|
%bcond tests 1
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Name: python-beautifulsoup4
|
|
|
|
|
Version: 4.10.0
|
|
|
|
|
Release: 6%{?dist}
|
|
|
|
|
Version: 4.12.3
|
|
|
|
|
Release: 8%{?dist}
|
|
|
|
|
Summary: HTML/XML parser for quick-turnaround applications like screen-scraping
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: http://www.crummy.com/software/BeautifulSoup/
|
|
|
|
|
Source0: https://files.pythonhosted.org/packages/source/b/beautifulsoup4/beautifulsoup4-%{version}.tar.gz
|
|
|
|
|
Patch0: nosieve.patch
|
|
|
|
|
# https://git.launchpad.net/beautifulsoup/commit/?id=9786a62726de5a8caba10021c4d4a58c8a3e9e3f
|
|
|
|
|
Patch1: soupsieve26.patch
|
|
|
|
|
Patch11: beautifulsoup4-4.12-disable-soupsieve.patch
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
%if 0%{?py2}
|
|
|
|
|
BuildRequires: python2-devel >= 2.7
|
|
|
|
|
# html5lib BR just for test coverage
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
BuildRequires: python2-html5lib
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
|
%if %{with soupsieve}
|
|
|
|
|
BuildRequires: python2-soupsieve
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: python2-lxml
|
|
|
|
|
BuildRequires: /usr/bin/2to3
|
|
|
|
|
BuildRequires: python2-tools
|
|
|
|
|
%endif
|
|
|
|
|
# html5lib BR just for test coverage
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
BuildRequires: python3-html5lib
|
|
|
|
|
BuildRequires: python3-lxml
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
%if %{with soupsieve}
|
|
|
|
|
BuildRequires: python3-packaging
|
|
|
|
|
BuildRequires: python3-soupsieve
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: python3-lxml
|
|
|
|
|
|
|
|
|
|
%global _description %{expand:
|
|
|
|
|
Beautiful Soup is a Python HTML/XML parser designed for quick
|
|
|
|
@ -61,18 +52,6 @@ minutes with Beautiful Soup.}
|
|
|
|
|
|
|
|
|
|
%description %_description
|
|
|
|
|
|
|
|
|
|
%if 0%{?py2}
|
|
|
|
|
%package -n python2-beautifulsoup4
|
|
|
|
|
Summary: %summary
|
|
|
|
|
Requires: python2-lxml
|
|
|
|
|
%if %{with soupsieve}
|
|
|
|
|
Requires: python2-soupsieve
|
|
|
|
|
%endif
|
|
|
|
|
%{?python_provide:%python_provide python2-beautifulsoup4}
|
|
|
|
|
|
|
|
|
|
%description -n python2-beautifulsoup4 %_description
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%package -n python3-beautifulsoup4
|
|
|
|
|
Summary: %summary
|
|
|
|
|
Requires: python3-lxml
|
|
|
|
@ -85,54 +64,99 @@ Obsoletes: python3-BeautifulSoup < 1:3.2.1-2
|
|
|
|
|
%description -n python3-beautifulsoup4 %_description
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n beautifulsoup4-%{version}
|
|
|
|
|
%autosetup -p1 -N -n beautifulsoup4-%{version}
|
|
|
|
|
%autopatch -p1 -M 10
|
|
|
|
|
%if %{without soupsieve}
|
|
|
|
|
%patch0 -p1
|
|
|
|
|
%autopatch -p1 -m 10
|
|
|
|
|
%endif
|
|
|
|
|
# Fix compatibility with lxml 5.3.0
|
|
|
|
|
# Reported upstream: https://bugs.launchpad.net/beautifulsoup/+bug/2076897
|
|
|
|
|
sed -i "s/strip_cdata=False,//" bs4/builder/_lxml.py
|
|
|
|
|
|
|
|
|
|
rm -rf %{py3dir} && cp -a . %{py3dir}
|
|
|
|
|
|
|
|
|
|
%generate_buildrequires
|
|
|
|
|
%pyproject_buildrequires %{?with_tests: -t}
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%{?py2:%{py2_build}}
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
2to3 --write --nobackups .
|
|
|
|
|
%{py3_build}
|
|
|
|
|
%pyproject_wheel
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%{?py2:%{py2_install}}
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
%{py3_install}
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%py3_check_import bs4
|
|
|
|
|
%pyproject_install
|
|
|
|
|
%pyproject_save_files bs4
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%{?py2:%{__python2} -m unittest discover -s bs4 || : }
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
%{__python3} -m unittest discover -s bs4 || :
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if 0%{?py2}
|
|
|
|
|
%files -n python2-beautifulsoup4
|
|
|
|
|
%license COPYING.txt
|
|
|
|
|
%doc NEWS.txt TODO.txt
|
|
|
|
|
%{python2_sitelib}/beautifulsoup4-%{version}*.egg-info
|
|
|
|
|
%{python2_sitelib}/bs4
|
|
|
|
|
%check
|
|
|
|
|
%tox
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files -n python3-beautifulsoup4
|
|
|
|
|
%license COPYING.txt
|
|
|
|
|
%doc NEWS.txt TODO.txt
|
|
|
|
|
%{python3_sitelib}/beautifulsoup4-%{version}*.egg-info
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc NEWS.txt CHANGELOG
|
|
|
|
|
%{python3_sitelib}/beautifulsoup4-%{version}.dist-info/
|
|
|
|
|
%{python3_sitelib}/bs4
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Mon Feb 14 2022 Steve Traylen <steve.traylen@cern.ch> - 4.10.0-6
|
|
|
|
|
- Build with soupsieve dependency to close circular dependency
|
|
|
|
|
* Wed Dec 25 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 4.12.3-8
|
|
|
|
|
- Rebuilt for MSVSphere 10
|
|
|
|
|
|
|
|
|
|
* Tue Oct 29 2024 Terje Rosten <terjeros@gmail.com> - 4.12.3-8
|
|
|
|
|
- Add soupsieve option
|
|
|
|
|
|
|
|
|
|
* Tue Aug 13 2024 Lumír Balhar <lbalhar@redhat.com> - 4.12.3-7
|
|
|
|
|
- Fix compatibility with lxml 5.3.0
|
|
|
|
|
|
|
|
|
|
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.12.3-6
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 4.12.3-5
|
|
|
|
|
- Rebuilt for Python 3.13
|
|
|
|
|
|
|
|
|
|
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 4.12.3-4
|
|
|
|
|
- Bootstrap for Python 3.13
|
|
|
|
|
|
|
|
|
|
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.12.3-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.12.3-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jan 17 2024 Terje Rosten <terje.rosten@ntnu.no> - 4.12.3-1
|
|
|
|
|
- 4.12.3
|
|
|
|
|
|
|
|
|
|
* Sat Dec 16 2023 Terje Rosten <terje.rosten@ntnu.no> - 4.12.2-5
|
|
|
|
|
- Add patch from upstream to fix test issue with libxml2 2.12.1 (bz#2251911)
|
|
|
|
|
|
|
|
|
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.12.2-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 4.12.2-3
|
|
|
|
|
- Rebuilt for Python 3.12
|
|
|
|
|
|
|
|
|
|
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 4.12.2-2
|
|
|
|
|
- Bootstrap for Python 3.12
|
|
|
|
|
|
|
|
|
|
* Thu Apr 13 2023 Terje Rosten <terje.rosten@ntnu.no> - 4.12.2-1
|
|
|
|
|
- 4.12.2
|
|
|
|
|
|
|
|
|
|
* Mon Mar 20 2023 Terje Rosten <terje.rosten@ntnu.no> - 4.12.0-1
|
|
|
|
|
- 4.12.0
|
|
|
|
|
|
|
|
|
|
* Thu Feb 02 2023 Terje Rosten <terje.rosten@ntnu.no> - 4.11.2-1
|
|
|
|
|
- 4.11.2
|
|
|
|
|
|
|
|
|
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.11.1-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jan 05 2023 Major Hayden <major@redhat.com> - 4.11.1-1
|
|
|
|
|
- Update to 4.11.1
|
|
|
|
|
|
|
|
|
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.11.0-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 4.11.0-2
|
|
|
|
|
- Rebuilt for Python 3.11
|
|
|
|
|
|
|
|
|
|
* Mon Feb 14 2022 Steve Traylen <steve.traylen@cern.ch> - 4.10.0-5
|
|
|
|
|
- Build without soupsieve dependency to break circular dependency
|
|
|
|
|
* Sat Apr 09 2022 Terje Rosten <terje.rosten@ntnu.no> - 4.11.0-1
|
|
|
|
|
- 4.11.0
|
|
|
|
|
|
|
|
|
|
* Sun Feb 13 2022 Terje Rosten <terje.rosten@ntnu.no> - 4.10.0-4
|
|
|
|
|
- Rebuild to get fc36/rawhide split
|