python-beautifulsoup4/python-beautifulsoup4.spec

196 lines
5.4 KiB
RPMSpec
Raw Normal View History

2013-03-19 20:58:53 +00:00
%if 0%{?fedora} > 1
2012-07-16 06:53:02 +00:00
%global with_python3 1
2013-03-19 20:58:53 +00:00
%endif
2012-07-16 06:53:02 +00:00
%global oname beautifulsoup4
Name: python-beautifulsoup4
2013-10-21 13:22:31 +00:00
Version: 4.3.2
Release: 2%{?dist}
2012-07-16 06:53:02 +00:00
Summary: HTML/XML parser for quick-turnaround applications like screen-scraping
Group: Development/Languages
License: MIT
URL: http://www.crummy.com/software/BeautifulSoup/
2013-10-21 13:22:31 +00:00
Source0: https://pypi.python.org/packages/source/b/beautifulsoup4/beautifulsoup4-%{version}.tar.gz
2012-07-16 06:53:02 +00:00
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python-html5lib
BuildRequires: python-devel
BuildRequires: python-setuptools
2013-03-19 20:58:53 +00:00
%if 0%{?rhel} && 0%{?rhel} <= 6
BuildRequires: python-unittest2
BuildRequires: python-nose
%endif
2012-07-16 06:53:02 +00:00
Requires: python-html5lib
2013-03-19 20:58:53 +00:00
%if 0%{?fedora}
BuildRequires: python-lxml
2012-07-16 06:53:02 +00:00
Requires: python-lxml
2013-03-19 20:58:53 +00:00
%endif
2012-07-16 06:53:02 +00:00
%if 0%{?with_python3}
BuildRequires: python-tools
BuildRequires: python3-html5lib
BuildRequires: python3-lxml
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%endif
%description
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_python3}
%package -n python3-beautifulsoup4
Summary: HTML/XML parser for quick-turnaround applications like screen-scraping
Group: Development/Languages
2012-07-22 18:00:55 +00:00
Requires: python3-html5lib
Requires: python3-lxml
2012-07-16 06:53:02 +00:00
Obsoletes: python3-BeautifulSoup < 1:3.2.1-2
%description -n python3-beautifulsoup4
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.
This is the Python 3 build of Beautiful Soup.
%endif # if with_python3
%prep
%setup -q -n %{oname}-%{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
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif
%build
%{__python} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
2to3 --write --nobackups .
%{__python3} setup.py build
%endif
%install
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
%endif
%check
2013-03-19 20:58:53 +00:00
%if 0%{?rhel} && 0%{?rhel} <= 6
PYTHONPATH=$(pwd) nosetests
%else
2013-08-19 18:18:15 +00:00
# Some tests fails
%{__python} -m unittest discover -s bs4 || :
2013-03-19 20:58:53 +00:00
%endif
2012-07-16 06:53:02 +00:00
%if 0%{?with_python3}
pushd %{py3dir}
# Some tests fails
%{__python3} -m unittest discover -s bs4 || :
%endif
%files
%doc *.txt
%{python_sitelib}/beautifulsoup4-%{version}*.egg-info
%{python_sitelib}/bs4
%if 0%{?with_python3}
%files -n python3-beautifulsoup4
%doc *.txt
%{python3_sitelib}/beautifulsoup4-%{version}*.egg-info
%{python3_sitelib}/bs4
%endif
%changelog
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 4.3.2-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
2013-10-21 13:22:31 +00:00
* Tue Oct 17 2013 Terje Rosten <terje.rosten@ntnu.no> - 4.3.2-1
- 4.3.2
2013-08-19 18:18:15 +00:00
* Mon Aug 19 2013 Terje Rosten <terje.rosten@ntnu.no> - 4.3.1-1
- 4.3.1
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
2013-06-29 12:02:27 +00:00
* Sat Jun 29 2013 Terje Rosten <terje.rosten@ntnu.no> - 4.2.1-1
- 4.2.1
* Mon May 27 2013 Terje Rosten <terje.rosten@ntnu.no> - 4.2.0-1
2013-05-27 08:59:29 +00:00
- 4.2.0
2013-03-19 20:58:53 +00:00
* Tue Mar 19 2013 Ralph Bean <rbean@redhat.com> - 4.1.3-3
- Don't include python-lxml for el6.
- Conditionalize python3 support.
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
2012-12-03 13:44:37 +00:00
* Mon Dec 03 2012 Terje Rosten <terje.rosten@ntnu.no> - 4.1.3-1
- 4.1.3
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 4.1.1-5
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
2012-07-22 18:00:55 +00:00
* Sun Jul 22 2012 Terje Rosten <terje.rosten@ntnu.no> - 4.1.1-4
- Move python3 req to sub package
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
2012-07-16 06:53:02 +00:00
* Tue Jul 10 2012 Terje Rosten <terje.rosten@ntnu.no> - 4.1.1-2
- License is MIT
- Remove old cruft
- Fix obsolete
* Mon Jul 09 2012 Terje Rosten <terje.rosten@ntnu.no> - 4.1.1-1
- 4.1.1
- Obsolete the old py3-bs4 from bs3 package
* Mon May 28 2012 Terje Rosten <terje.rosten@ntnu.no> - 4.0.5-1
- 4.0.5
* Sat Mar 24 2012 Terje Rosten <terje.rosten@ntnu.no> - 4.0.1-1
- initial package based on python-BeautifulSoup.