|
|
|
@ -1,22 +1,30 @@
|
|
|
|
|
%if 0%{?fedora} < 33
|
|
|
|
|
%global py2 1
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Name: python-beautifulsoup4
|
|
|
|
|
Version: 4.6.3
|
|
|
|
|
Release: 4%{?dist}
|
|
|
|
|
Version: 4.8.0
|
|
|
|
|
Release: 1%{?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
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
%if 0%{?py2}
|
|
|
|
|
BuildRequires: python2-devel >= 2.7
|
|
|
|
|
# html5lib BR just for test coverage
|
|
|
|
|
BuildRequires: python2-html5lib
|
|
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
|
BuildRequires: python2-soupsieve
|
|
|
|
|
BuildRequires: python2-lxml
|
|
|
|
|
BuildRequires: /usr/bin/2to3
|
|
|
|
|
BuildRequires: python2-tools
|
|
|
|
|
%endif
|
|
|
|
|
# html5lib BR just for test coverage
|
|
|
|
|
BuildRequires: python3-html5lib
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
BuildRequires: python3-soupsieve
|
|
|
|
|
BuildRequires: python3-lxml
|
|
|
|
|
|
|
|
|
|
%global _description\
|
|
|
|
@ -40,54 +48,60 @@ minutes with Beautiful Soup.
|
|
|
|
|
|
|
|
|
|
%description %_description
|
|
|
|
|
|
|
|
|
|
%if 0%{?py2}
|
|
|
|
|
%package -n python2-beautifulsoup4
|
|
|
|
|
Summary: %summary
|
|
|
|
|
Requires: python2-lxml
|
|
|
|
|
Requires: python2-soupsieve
|
|
|
|
|
%{?python_provide:%python_provide python2-beautifulsoup4}
|
|
|
|
|
%description -n python2-beautifulsoup4 %_description
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%package -n python3-beautifulsoup4
|
|
|
|
|
Summary: %summary
|
|
|
|
|
Requires: python3-lxml
|
|
|
|
|
Requires: python3-soupsieve
|
|
|
|
|
Obsoletes: python3-BeautifulSoup < 1:3.2.1-2
|
|
|
|
|
%description -n python3-beautifulsoup4 %_description
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n beautifulsoup4-%{version}
|
|
|
|
|
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_build}
|
|
|
|
|
%{?py2:%{py2_build}}
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
2to3 --write --nobackups .
|
|
|
|
|
%{py3_build}
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%{py2_install}
|
|
|
|
|
%{?py2:%{py2_install}}
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
%{py3_install}
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%{__python2} -m unittest discover -s bs4
|
|
|
|
|
%{?py2:%{__python2} -m unittest discover -s bs4 || : }
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
%{__python3} -m unittest discover -s bs4
|
|
|
|
|
%{__python3} -m unittest discover -s bs4 || :
|
|
|
|
|
|
|
|
|
|
%if 0%{?py2}
|
|
|
|
|
%files -n python2-beautifulsoup4
|
|
|
|
|
%license COPYING.txt
|
|
|
|
|
%doc AUTHORS.txt NEWS.txt TODO.txt
|
|
|
|
|
%doc NEWS.txt TODO.txt
|
|
|
|
|
%{python2_sitelib}/beautifulsoup4-%{version}*.egg-info
|
|
|
|
|
%{python2_sitelib}/bs4
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files -n python3-beautifulsoup4
|
|
|
|
|
%license COPYING.txt
|
|
|
|
|
%doc AUTHORS.txt NEWS.txt TODO.txt
|
|
|
|
|
%doc NEWS.txt TODO.txt
|
|
|
|
|
%{python3_sitelib}/beautifulsoup4-%{version}*.egg-info
|
|
|
|
|
%{python3_sitelib}/bs4
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* 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
|
|
|
|
|
|
|
|
|
|