%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} Name: python-cssselect Version: 0.7.1 Release: 2%{?dist} Summary: Parses CSS3 Selectors and translates them to XPath 1.0 License: BSD URL: http://packages.python.org/cssselect/ Source0: http://pypi.python.org/packages/source/c/cssselect/cssselect-0.7.1.tar.gz BuildArch: noarch BuildRequires: python2-devel %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 cssselect-%{version} %build python setup.py build %install python setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT chmod 755 $RPM_BUILD_ROOT/%{python_sitelib}/cssselect/tests.py %files %doc AUTHORS docs README.rst CHANGES LICENSE PKG-INFO %{python_sitelib}/cssselect %{python_sitelib}/cssselect-%{version}-py2.7.egg-info %changelog * Fri Nov 09 2012 Kevin Fenzi 0.7.1-2 - Fixes from review. * Fri Nov 09 2012 Kevin Fenzi 0.7.1-1 - Initial version for review