%global pypi_name restkit Name: python-%{pypi_name} Version: 4.1.2 Release: 2%{?dist} Summary: Restkit is an HTTP resource kit for Python License: MIT URL: http://benoitc.github.com/restkit/ Source0: http://pypi.python.org/packages/source/r/restkit/restkit-4.1.2.tar.gz Patch0: restkit-disable-tests-needing-internet-connection.patch BuildArch: noarch Requires: python-socketpool Requires: python-http-parser >= 0.7.4 Requires: python-webob BuildRequires: python-devel BuildRequires: python-setuptools BuildRequires: python-nose BuildRequires: python-socketpool BuildRequires: python-http-parser >= 0.7.4 BuildRequires: python-webob %description Restkit is a full HTTP client using pure socket calls and its own HTTP parser. It's not based on httplib or urllib2. %prep %setup -q -n %{pypi_name}-%{version} # remove bundled egg-info rm -rf %{pypi_name}.egg-info %patch0 -p0 %build %{__python} setup.py build %install %{__python} setup.py install -O1 --skip-build --root %{buildroot} --install-data %{_docdir} # remove zero-length file rm %{buildroot}%{_docdir}/%{pypi_name}/TODO.txt # strip shebang from non-executable file sed -i '1d' %{buildroot}%{python_sitelib}/%{pypi_name}/contrib/webob_api.py %check nosetests --exclude="009-test-oauth_filter" %files %doc %{_docdir}/%{pypi_name}/ %{_bindir}/restcli %{python_sitelib}/restkit* # exclude the test files that get into %%{python_sitelib} %exclude %{python_sitelib}/tests %changelog * Tue Mar 27 2012 Bohuslav Kabrda - 4.1.2-2 - Remove IPython dependency (it is only optional). - Stripped the shebang from non-executable file. * Thu Mar 22 2012 Bohuslav Kabrda - 4.1.2-1 - Initial package.