%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
Name: python-mygpoclient
Version: 1.0
Release: 2%{?dist}
Summary: Python module to connect to the my.gpodder.org webservice
Group: System Environment/Libraries
License: GPLv3+
URL: http://thpinfo.com/2010/mygpoclient/
Source0: http://thpinfo.com/2010/mygpoclient/mygpoclient-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python-minimock
BuildRequires: python-coverage
BuildRequires: python-nose
%description
%{name} is a client-library to connect the my.gpodder.org webservice.
%prep
%setup -q -n mygpoclient-%{version}
# Leave out http-tests as they currently fail occasionally (reported upstream)
rm mygpoclient/http_test.py
%build
%{__python} setup.py build
%check
nosetests --cover-erase --with-coverage --with-doctest --cover-package=mygpoclient
%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{python_sitelib}/mygpoclient
%{python_sitelib}/mygpoclient*.egg-info
%exclude %{python_sitelib}/mygpoclient/*test.py
%doc README COPYING AUTHORS
%changelog
* Fri Jan 22 2010 Sven Lankes <sven@lank.es> - 1.0-2
- SPEC-Tweaks incorporating feedback from #fedora-de
- Rename to ease adding a python 3 variant later
- Run testsuite during build
* Fri Jan 22 2010 Sven Lankes <sven@lank.es> - 1.0-1
- initial package