%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
Name: python-yourls
Version: 0.1.1
Release: 2%{?dist}
Summary: Simple Python client for the YOURLS URL shortener
License: GPLv2+
URL: http://tflink.github.com/python-yourls/
Source0: https://github.com/downloads/tflink/python-yourls/%{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python-devel
# This only exists in F16 and newer
BuildRequires: pytest
%description
Simple Python client for the YOURLS URL shortener
%prep
%setup -q
# the dependency needed to run the tests is only included in F16 and newer
# python-pytest > 2.0
%check
%{__python} setup.py test
%build
%{__python} setup.py build
%install
rm -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc LICENSE README
%{python_sitelib}/*
%changelog
* Tue Aug 30 2011 Tim Flink <tflink@fedoraproject.org> - 0.1.1-2
- corrected license tag
* Tue Aug 23 2011 Tim Flink <tflink@fedoraproject.org> - 0.1.1-1
- Initial package for 0.1.1