From b1931e0f6de0511bf62cc5bf5a00ee955f9b0c68 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Tue, 19 Mar 2013 16:58:53 -0400 Subject: [PATCH] Get tests to pass on el6. --- python-beautifulsoup4.spec | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/python-beautifulsoup4.spec b/python-beautifulsoup4.spec index c3f7091..8624746 100644 --- a/python-beautifulsoup4.spec +++ b/python-beautifulsoup4.spec @@ -1,9 +1,11 @@ +%if 0%{?fedora} > 1 %global with_python3 1 +%endif %global oname beautifulsoup4 Name: python-beautifulsoup4 Version: 4.1.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: HTML/XML parser for quick-turnaround applications like screen-scraping Group: Development/Languages License: MIT @@ -12,11 +14,20 @@ Source0: http://www.crummy.com/software/BeautifulSoup/bs4/download/beauti BuildArch: noarch BuildRequires: python-devel BuildRequires: python-html5lib -BuildRequires: python-lxml BuildRequires: python-devel BuildRequires: python-setuptools +%if 0%{?rhel} && 0%{?rhel} <= 6 +BuildRequires: python-unittest2 +BuildRequires: python-nose +%endif + Requires: python-html5lib + +%if 0%{?fedora} +BuildRequires: python-lxml Requires: python-lxml +%endif + %if 0%{?with_python3} BuildRequires: python-tools BuildRequires: python3-html5lib @@ -104,7 +115,11 @@ pushd %{py3dir} %endif %check +%if 0%{?rhel} && 0%{?rhel} <= 6 +PYTHONPATH=$(pwd) nosetests +%else %{__python} -m unittest discover -s bs4 +%endif %if 0%{?with_python3} pushd %{py3dir} @@ -125,6 +140,10 @@ pushd %{py3dir} %endif %changelog +* Tue Mar 19 2013 Ralph Bean - 4.1.3-3 +- Don't include python-lxml for el6. +- Conditionalize python3 support. + * Thu Feb 14 2013 Fedora Release Engineering - 4.1.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild