Fix a problem with cookie handling

+ https://bugzilla.redhat.com/show_bug.cgi?id=906924
This commit is contained in:
Toshio Kuratomi 2013-02-08 14:59:36 -08:00
commit f439ffedeb
2 changed files with 68 additions and 9 deletions

View file

@ -1,4 +1,4 @@
%if 0%{?fedora} > 12 || 0%{?rhel} > 6
%if 0%{?fedora}
%global _with_python3 1
%else
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
@ -6,15 +6,17 @@
Name: python-requests
Version: 0.13.1
Release: 1%{?dist}
Release: 2%{?dist}
Summary: HTTP library, written in Python, for human beings
License: ISC and MIT
URL: http://pypi.python.org/pypi/requests
Source0: http://pypi.python.org/packages/source/r/requests/requests-%{version}.tar.gz
# Separate response cookies from request cookies discussed here:
# https://github.com/fedora-infra/python-fedora/pull/6
Patch0: python-requests-cookie-handling.patch
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python2-devel
Requires: ca-certificates
@ -42,21 +44,42 @@ Requires: python-chardet
%prep
%setup -q -n requests-%{version}
%build
%{__python} setup.py build
%patch0 -p1
### TODO: Need to unbundle libraries in the packages directory.
### https://bugzilla.redhat.com/show_bug.cgi?id=904623
### Priority urllib3 since it's still bundled in requests-1.0.x
### And it's a security issue:
### https://bugzilla.redhat.com/show_bug.cgi?id=855322
### https://bugzilla.redhat.com/show_bug.cgi?id=855323
### Review request for urllib3:
### https://bugzilla.redhat.com/show_bug.cgi?id=907688
%if 0%{?_with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with_python3
%build
%if 0%{?_with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif
%{__python} setup.py build
%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%if 0%{?_with_python3}
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
popd
%endif
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc NOTICE LICENSE README.rst HISTORY.rst
@ -72,6 +95,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Fri Feb 8 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 0.13.1-2
- Fix a problem with cookie handling
+ https://bugzilla.redhat.com/show_bug.cgi?id=906924
* Sun Jun 10 2012 Arun S A G <sagarun@gmail.com> 0.13.1-1
- Updated to latest upstream release 0.13.1
- Use system provided ca-certificates