%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")} %define oname BeautifulSoup Name: python-BeautifulSoup Version: 3.0.7a Release: 3%{?dist}.art Summary: HTML/XML parser for quick-turnaround applications like screen-scraping Group: Development/Languages License: BSD URL: http://www.crummy.com/software/BeautifulSoup/ Source0: http://www.crummy.com/software/BeautifulSoup/download/3.x/%{oname}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel %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. %prep %setup -q -n %{oname}-%{version} %build %{__python} setup.py build %{__python} -c 'import %{oname} as bs; print bs.__doc__' > COPYING touch -r %{oname}.py COPYING %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT #Files installed by error rm -rf $RPM_BUILD_ROOT%{_bindir} %clean rm -rf $RPM_BUILD_ROOT %check %{__python} BeautifulSoupTests.py %files %defattr(-,root,root,-) %doc COPYING %{python_sitelib}/%{oname}.py* # el6 #%{python_sitelib}/BeautifulSoup-3.0.7a-py2.6.egg-info # el7 %{python_sitelib}/BeautifulSoup-3.0.7a-py2.7.egg-info %exclude %{python_sitelib}/%{oname}Tests.py* %changelog * Mon Jan 12 2009 kwizart < kwizart at gmail.com > - 3.0.7a-3 - ReTag * Mon Jan 12 2009 kwizart < kwizart at gmail.com > - 3.0.7a-2 - Backport for EL-5 * Wed Oct 15 2008 kwizart < kwizart at gmail.com > - 3.0.7a-1 - Update to 3.0.7a * Mon Jun 30 2008 Terje Rosten - 3.0.7-2 - Rebuild * Mon Jun 23 2008 Michel Alexandre Salim - 3.0.7-1 - Update to 3.0.7 * Tue Feb 5 2008 Terje Rosten - 3.0.5-3 - Fix typo * Tue Feb 5 2008 Terje Rosten - 3.0.5-2 - Handle egg info - Bump release * Tue Feb 5 2008 Terje Rosten - 3.0.5-1 - Update to 3.0.5 - Minor tweaks to spec file * Wed Apr 18 2007 kwizart < kwizart at gmail.com > - 3.0.4-1 - Update to 3.0.4 * Wed Nov 29 2006 TC Wan - Initial SPEC file for Fedora Core 5