# Created by pyp2rpm-0.5.1 %global pypi_name cssselect Name: python-%{pypi_name} Version: 0.7.1 Release: 1%{?dist} Summary: cssselect parses CSS3 Selectors and translates them to XPath 1.0 License: BSD URL: http://pypi.python.org/pypi/%{pypi_name}/%{version} Source0: http://pypi.python.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python-devel BuildRequires: python-sphinx # for tests BuildRequires: python-nose BuildRequires: python-lxml %description cssselect parses `CSS3 Selectors`_ and translates them to `XPath 1.0`_ expressions. Such expressions can be used in lxml_ or another XPath engine to find the matching elements in an XML or HTML document. %prep %setup -q -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info # generate html docs PYTHONPATH=$(pwd) sphinx-build docs html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %build %{__python} setup.py build %install %{__python} setup.py install --skip-build --root %{buildroot} %check nosetests cssselect/tests.py %files %doc html README.rst LICENSE %exclude %{python_sitelib}/%{pypi_name}/tests.py* %{python_sitelib}/%{pypi_name} %{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %changelog * Mon Nov 05 2012 Bohuslav Kabrda - 0.7.1-1 - Initial package.