# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%define srcname urllib2_kerberos
Name: python-%{srcname}
Version: 0.1.6
Release: 3%{?dist}
Summary: Kerberos over HTTP Negotiate/SPNEGO support for urllib2
Group: Development/Languages
License: ASL 2.0
URL: http://pypi.python.org/pypi/%{srcname}/
Source0: http://pypi.python.org/packages/source/u/%{srcname}/%{srcname}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python-setuptools-devel
%description
urllib2 with kerberos authentication.
%prep
%setup -q -n %{srcname}-%{version}
tail -n +2 urllib2_kerberos.py >patched-urllib2_kerberos.py
mv patched-urllib2_kerberos.py urllib2_kerberos.py
%build
%{__python} setup.py build
%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{python_sitelib}/*
%changelog
* Thu Jun 18 2009 Matěj Cepl <mcepl@redhat.com> - 0.1.6-3
- don't preserve attributes of the file you modified.
* Wed Jun 17 2009 Matěj Cepl <mcepl@redhat.com> - 0.1.6-2
- add BuildRequires: python-setuptools-devel.
* Thu Jun 11 2009 Matěj Cepl <mcepl@redhat.com> - 0.1.6-1
- Initial packaging effort