|
|
|
@ -1,200 +1,106 @@
|
|
|
|
|
# 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
|
|
|
|
|
%endif
|
|
|
|
|
# Bootstracp
|
|
|
|
|
%global with_tests 0
|
|
|
|
|
|
|
|
|
|
Name: python-beautifulsoup4
|
|
|
|
|
Version: 4.10.0
|
|
|
|
|
Release: 6%{?dist}
|
|
|
|
|
Version: 4.6.3
|
|
|
|
|
Release: 2%{?dist}.1
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
%if %{with soupsieve}
|
|
|
|
|
BuildRequires: python3-soupsieve
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: python3-lxml
|
|
|
|
|
|
|
|
|
|
%global _description %{expand:
|
|
|
|
|
Beautiful Soup is a Python HTML/XML parser designed for quick
|
|
|
|
|
turnaround projects like screen-scraping. Three features make it
|
|
|
|
|
powerful:
|
|
|
|
|
|
|
|
|
|
Beautiful Soup won't choke if you give it bad markup.
|
|
|
|
|
|
|
|
|
|
Beautiful Soup provides a few simple methods and Pythonic idioms for
|
|
|
|
|
navigating, searching, and modifying a parse tree.
|
|
|
|
|
|
|
|
|
|
Beautiful Soup automatically converts incoming documents to Unicode
|
|
|
|
|
and outgoing documents to UTF-8.
|
|
|
|
|
|
|
|
|
|
Beautiful Soup parses anything you give it.
|
|
|
|
|
|
|
|
|
|
Valuable data that was once locked up in poorly-designed websites is
|
|
|
|
|
now within your reach. Projects that would have taken hours take only
|
|
|
|
|
minutes with Beautiful Soup.}
|
|
|
|
|
%if 0%{?with_tests}
|
|
|
|
|
# html5lib BR just for test coverage
|
|
|
|
|
BuildRequires: python2-html5lib
|
|
|
|
|
BuildRequires: python3-html5lib
|
|
|
|
|
%endif # with_tests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%global _description\
|
|
|
|
|
Beautiful Soup is a Python HTML/XML parser designed for quick\
|
|
|
|
|
turnaround projects like screen-scraping. Three features make it\
|
|
|
|
|
powerful:\
|
|
|
|
|
\
|
|
|
|
|
Beautiful Soup wont choke if you give it bad markup.\
|
|
|
|
|
\
|
|
|
|
|
Beautiful Soup provides a few simple methods and Pythonic idioms for\
|
|
|
|
|
navigating, searching, and modifying a parse tree.\
|
|
|
|
|
\
|
|
|
|
|
Beautiful Soup automatically converts incoming documents to Unicode\
|
|
|
|
|
and outgoing documents to UTF-8.\
|
|
|
|
|
\
|
|
|
|
|
Beautiful Soup parses anything you give it.\
|
|
|
|
|
\
|
|
|
|
|
Valuable data that was once locked up in poorly-designed websites is\
|
|
|
|
|
now within your reach. Projects that would have taken hours take only\
|
|
|
|
|
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
|
|
|
|
|
%if %{with soupsieve}
|
|
|
|
|
Requires: python3-soupsieve
|
|
|
|
|
%endif
|
|
|
|
|
Obsoletes: python3-BeautifulSoup < 1:3.2.1-2
|
|
|
|
|
%{?python_provide:%python_provide python3-beautifulsoup4}
|
|
|
|
|
|
|
|
|
|
%description -n python3-beautifulsoup4 %_description
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n beautifulsoup4-%{version}
|
|
|
|
|
%if %{without soupsieve}
|
|
|
|
|
%patch0 -p1
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
mv AUTHORS.txt AUTHORS.txt.iso
|
|
|
|
|
iconv -f ISO-8859-1 -t UTF-8 -o AUTHORS.txt AUTHORS.txt.iso
|
|
|
|
|
touch -r AUTHORS.txt.iso AUTHORS.txt
|
|
|
|
|
rm -rf %{py3dir} && cp -a . %{py3dir}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%{?py2:%{py2_build}}
|
|
|
|
|
%{py2_build}
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
2to3 --write --nobackups .
|
|
|
|
|
%{py3_build}
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%{?py2:%{py2_install}}
|
|
|
|
|
%{py2_install}
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
%{py3_install}
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_tests}
|
|
|
|
|
%check
|
|
|
|
|
%py3_check_import bs4
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%{?py2:%{__python2} -m unittest discover -s bs4 || : }
|
|
|
|
|
%{__python2} -m unittest discover -s bs4
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
%{__python3} -m unittest discover -s bs4 || :
|
|
|
|
|
%endif
|
|
|
|
|
%{__python3} -m unittest discover -s bs4
|
|
|
|
|
%endif # with_tests
|
|
|
|
|
|
|
|
|
|
%if 0%{?py2}
|
|
|
|
|
%files -n python2-beautifulsoup4
|
|
|
|
|
%license COPYING.txt
|
|
|
|
|
%doc NEWS.txt TODO.txt
|
|
|
|
|
%doc AUTHORS.txt NEWS.txt TODO.txt
|
|
|
|
|
%{python2_sitelib}/beautifulsoup4-%{version}*.egg-info
|
|
|
|
|
%{python2_sitelib}/bs4
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files -n python3-beautifulsoup4
|
|
|
|
|
%license COPYING.txt
|
|
|
|
|
%doc NEWS.txt TODO.txt
|
|
|
|
|
%doc AUTHORS.txt NEWS.txt TODO.txt
|
|
|
|
|
%{python3_sitelib}/beautifulsoup4-%{version}*.egg-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
|
|
|
|
|
|
|
|
|
|
* Mon Feb 14 2022 Steve Traylen <steve.traylen@cern.ch> - 4.10.0-5
|
|
|
|
|
- Build without soupsieve dependency to break circular dependency
|
|
|
|
|
|
|
|
|
|
* Sun Feb 13 2022 Terje Rosten <terje.rosten@ntnu.no> - 4.10.0-4
|
|
|
|
|
- Rebuild to get fc36/rawhide split
|
|
|
|
|
|
|
|
|
|
* Tue Feb 08 2022 Steve Traylen <steve.traylen@cern.ch> - 4.10.0-3
|
|
|
|
|
- New bcond flag to disable/enable soupsieve dependency
|
|
|
|
|
- New bcond flag to disable/enable testing
|
|
|
|
|
- Test module loading in check section
|
|
|
|
|
|
|
|
|
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.10.0-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Sep 09 2021 Terje Rosten <terje.rosten@ntnu.no> - 4.10.0-1
|
|
|
|
|
- 4.10.0
|
|
|
|
|
|
|
|
|
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.3-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 4.9.3-3
|
|
|
|
|
- Rebuilt for Python 3.10
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.3-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Oct 11 2020 Terje Rosten <terje.rosten@ntnu.no> - 4.9.3-1
|
|
|
|
|
- 4.9.3
|
|
|
|
|
|
|
|
|
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.1-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Jun 07 2020 Terje Rosten <terje.rosten@ntnu.no> - 4.9.1-1
|
|
|
|
|
- 4.9.1
|
|
|
|
|
|
|
|
|
|
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 4.9.0-2
|
|
|
|
|
- Rebuilt for Python 3.9
|
|
|
|
|
|
|
|
|
|
* Mon Apr 13 2020 Terje Rosten <terje.rosten@ntnu.no> - 4.9.0-1
|
|
|
|
|
- 4.9.0
|
|
|
|
|
|
|
|
|
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.2-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Jan 19 2020 Terje Rosten <terje.rosten@ntnu.no> - 4.8.2-1
|
|
|
|
|
- 4.8.2
|
|
|
|
|
|
|
|
|
|
* Mon Dec 02 2019 Terje Rosten <terje.rosten@ntnu.no> - 4.8.1-1
|
|
|
|
|
- 4.8.1
|
|
|
|
|
|
|
|
|
|
* Tue Sep 03 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.8.0-3
|
|
|
|
|
- Subpackage python2-beautifulsoup4 has been removed (#1748299)
|
|
|
|
|
|
|
|
|
|
* Mon Aug 19 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.8.0-2
|
|
|
|
|
- Rebuilt for Python 3.8 (again)
|
|
|
|
|
|
|
|
|
|
* Sun Aug 18 2019 Terje Rosten <terje.rosten@ntnu.no> - 4.8.0-1
|
|
|
|
|
- 4.8.0
|
|
|
|
|
|
|
|
|
|
* Sat Aug 17 2019 Miro Hrončok <mhroncok@redhat.com> - 4.6.3-4
|
|
|
|
|
- Rebuilt for Python 3.8
|
|
|
|
|
* Thu Feb 22 2024 Sergey Cherevko <s.cherevko@msvsphere-os.ru> - 4.6.3-2.1
|
|
|
|
|
- Rebuilt for MSVSphere 8.9
|
|
|
|
|
|
|
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.3-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
* Mon Jul 22 2019 Stephen Smoogen <smooge@fedora00.int.smoogespace.com> - 4.6.3-2.1
|
|
|
|
|
- Add in Troy Dawson <tdawson@redhat.com> patch for bootstrapping
|
|
|
|
|
|
|
|
|
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.3-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|