Blob Blame History Raw
%global pypi_name restkit

Name:           python-%{pypi_name}
Version:        4.2.0
Release:        3%{?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-%{version}.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
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Mon Nov 05 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 4.2.0-1
- Update to 4.2.0.

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

* Tue Mar 27 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 4.1.2-2
- Remove IPython dependency (it is only optional).
- Stripped the shebang from non-executable file.

* Thu Mar 22 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 4.1.2-1
- Initial package.