From 38d5e982d7eaa39e4ed822a05572dd450e0905f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Tue, 26 Jul 2016 20:34:10 +0300 Subject: [PATCH] Don't require html5lib if lxml is required, require lxml on EL7 https://bugzilla.redhat.com/show_bug.cgi?id=1360436 --- python-beautifulsoup4.spec | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/python-beautifulsoup4.spec b/python-beautifulsoup4.spec index f0e7e2b..361f19a 100644 --- a/python-beautifulsoup4.spec +++ b/python-beautifulsoup4.spec @@ -1,3 +1,9 @@ +%if 0%{?fedora} || 0%{?rhel} > 6 +%bcond_without lxml +%else +%bcond_with lxml +%endif + %if 0%{?fedora} > 1 %global with_python3 1 %endif @@ -20,20 +26,11 @@ BuildRequires: python-setuptools BuildRequires: python-unittest2 BuildRequires: python-nose %endif - -Requires: python-html5lib - -%if 0%{?fedora} +%if %{with lxml} BuildRequires: python-lxml Requires: python-lxml -%endif - -%if 0%{?with_python3} -BuildRequires: python-tools -BuildRequires: python3-html5lib -BuildRequires: python3-lxml -BuildRequires: python3-devel -BuildRequires: python3-setuptools +%else +Requires: python-html5lib %endif %description @@ -59,8 +56,16 @@ minutes with Beautiful Soup. %package -n python3-beautifulsoup4 Summary: HTML/XML parser for quick-turnaround applications like screen-scraping Group: Development/Languages -Requires: python3-html5lib +BuildRequires: python-tools +BuildRequires: python3-html5lib +BuildRequires: python3-devel +BuildRequires: python3-setuptools +%if %{with lxml} +BuildRequires: python3-lxml Requires: python3-lxml +%else +Requires: python3-html5lib +%endif Obsoletes: python3-BeautifulSoup < 1:3.2.1-2 %description -n python3-beautifulsoup4 @@ -141,6 +146,10 @@ pushd %{py3dir} %endif %changelog +* Tue Jul 26 2016 Ville Skyttä +- Don't require html5lib if lxml is required +- Require lxml on EL7 + * Tue Jul 19 2016 Fedora Release Engineering - 4.4.1-4 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages