Add bcond flags to disable optional cirucular deps
New bcond flag to disable/enable soupsieve dependency New bcond flag to disable/enable testing Test module loading in check section
This commit is contained in:
parent
aa4bafadd6
commit
ee9be21d72
@ -1,10 +1,14 @@
|
||||
# Ciruclar dependency with soupsieve which must be disabled at times
|
||||
%bcond_without soupsieve
|
||||
%bcond_without tests
|
||||
|
||||
%if 0%{?fedora} < 32 && 0%{?rhel} < 8
|
||||
%global py2 1
|
||||
%endif
|
||||
|
||||
Name: python-beautifulsoup4
|
||||
Version: 4.10.0
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: HTML/XML parser for quick-turnaround applications like screen-scraping
|
||||
License: MIT
|
||||
URL: http://www.crummy.com/software/BeautifulSoup/
|
||||
@ -13,18 +17,26 @@ 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:
|
||||
@ -52,7 +64,9 @@ minutes with Beautiful Soup.}
|
||||
%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
|
||||
@ -61,7 +75,9 @@ Requires: python2-soupsieve
|
||||
%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}
|
||||
|
||||
@ -83,9 +99,13 @@ pushd %{py3dir}
|
||||
%{py3_install}
|
||||
|
||||
%check
|
||||
%py3_check_import 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
|
||||
@ -102,6 +122,11 @@ pushd %{py3dir}
|
||||
%{python3_sitelib}/bs4
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user