Blob Blame History Raw
%if 0%{?rhel} <= 5
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%endif

%global modname strainer

Name:           python-strainer
Version:        0.1.4
Release:        3%{?dist}
Summary:        Tools to allow developers to cleanup web serialization objects

Group:          Development/Languages
License:        MIT
URL:            http://pypi.python.org/pypi/strainer
Source0:        http://pypi.python.org/packages/source/s/%{modname}/%{modname}-%{version}.tar.gz
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  python2-devel
BuildRequires:  python-setuptools

%description
Provides middleware for detecting and correcting errors in web pages that are
served via the standard WSGI protocol used by most Python web frameworks. By
default, validation errors are logged to the "strainer.middleware" channel
using the standard Python logging module.

%prep
%setup -q -n %{modname}-%{version}

%build
sed -i 1d strainer/xhtmlify.py
%{__python} setup.py build

%install
rm -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build \
    --install-data=%{_datadir} --root %{buildroot}

%clean
rm -rf %{buildroot}

%files
%{python_sitelib}/*

%changelog
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Thu Mar 08 2012 Luke Macken <lmacken@redhat.com> - 0.1.4-2
- Remove the shebang from xhtmlify.py
- Remove unnecessary EPEL conditionals

* Tue Jul 12 2011 Luke Macken <lmacken@redhat.com> - 0.1.4-1
- Initial package