%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %define modulename html5lib Summary: A python based HTML parser/tokenizer based on the WHATWG HTML5 specification Name: python-%{modulename} Version: 0.10 Release: 1%{dist} Group: Development/Libraries License: MIT URL: http://code.google.com/p/html5lib/ BuildArch: noarch Source0: http://html5lib.googlecode.com/files/%{modulename}-%{version}.zip BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if 0%{?fedora} >= 8 BuildRequires: python-setuptools-devel %else BuildRequires: python-setuptools %endif %description A python based HTML parser/tokenizer based on the WHATWG HTML5 specification for maximum compatibility with major desktop web browsers. %prep %setup -q -n %{modulename}-%{version} %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{python_sitelib} %{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,0755) %doc examples README %{python_sitelib}/%{modulename}/*.py %{python_sitelib}/%{modulename}/*.pyc %{python_sitelib}/%{modulename}/*.pyo %{python_sitelib}/%{modulename}/filters %{python_sitelib}/%{modulename}/serializer %{python_sitelib}/%{modulename}/treebuilders %{python_sitelib}/%{modulename}/treewalkers %if 0%{?fedora} >= 8 %{python_sitelib}/%{modulename}-%{version}-*.egg-info %endif %changelog * Sun Jan 27 2008 Oded Arbel 0.10-1 - New upstream release * Sun Jan 20 2008 Ruben Kerkhof 0.9-3 - Cleanup spec to comply with latest packaging guidelines * Tue Aug 14 2007 Oded Arbel 0.9-2 - autodetect python sitelib according to Fedora packaging guidelines * Mon Aug 13 2007 Oded Arbel 0.9-1 - First build