14
0

Accepting request 337534 from home:XRevan86

- Update to 2.8.0.

OBS-URL: https://build.opensuse.org/request/show/337534
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=74
This commit is contained in:
Denisart Benjamin
2015-10-09 23:04:58 +00:00
committed by Git OBS Bridge
parent c2c322bad8
commit e41975ba9d
6 changed files with 103 additions and 90 deletions

View File

@@ -17,21 +17,19 @@
Name: python-requests
Version: 2.7.0
Version: 2.8.0
Release: 0
Url: http://python-requests.org
Summary: Awesome Python HTTP Library That's Actually Usable
License: Apache-2.0
Group: Development/Languages/Python
#TODO/FIXME: Maybe split out charade and urllib3 into sub-packages to simplify:
Url: http://python-requests.org
Source: http://pypi.python.org/packages/source/r/requests/requests-%{version}.tar.gz
# PATCH-FIX-OPENSUSE no-default-cacert.patch -- completely ignore the internal CA bundle
Patch0: no-default-cacert.patch
# PATCH-FIX-OPENSUSE no-default-cacert-sles.patch -- completely ignore the internal CA bundle (SLES version)
# PATCH-FIX-SLE no-default-cacert-sles.patch -- completely ignore the internal CA bundle (SLES version)
Patch1: no-default-cacert-sles.patch
# PATCH-FIX-OPENSUSE requests-do-not-use-bundle.patch --use system libraries instead of bundled ones
Patch2: requests-do-not-use-bundle.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python
BuildRequires: python-devel
BuildRequires: python-py
@@ -40,44 +38,44 @@ Requires: python
Requires: python-chardet
Requires: python-py
Requires: python-urllib3
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%if 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%else
BuildArch: noarch
%endif
%description
Requests is an ISC Licensed HTTP library, written in Python, for human
beings.
Requests is an ISC Licensed HTTP library, written in Python, for
human beings.
Most existing Python modules for sending HTTP requests are extremely
verbose and cumbersome. Python's builtin urllib2 module provides most of
the HTTP capabilities you should need, but the api is thoroughly broken.
It requires an enormous amount of work (even method overrides) to
perform the simplest of tasks.
Most existing Python modules for sending HTTP requests are
extremely verbose and cumbersome. Python's builtin urllib2 module
provides most of the HTTP capabilities you should need, but the api
is thoroughly broken. It requires an enormous amount of work (even
method overrides) to perform the simplest of tasks.
Features:
- Extremely simple GET, HEAD, POST, PUT, DELETE Requests
+ Simple HTTP Header Request Attachment
+ Simple Data/Params Request Attachment
+ Simple Multipart File Uploads
+ CookieJar Support
+ Redirection History
+ Redirection Recursion Urllib Fix
+ Auto Decompression of GZipped Content
+ Unicode URL Support
- Simple Authentication
+ Simple URL + HTTP Auth Registry
- Extremely simple GET, HEAD, POST, PUT, DELETE Requests:
+ Simple HTTP Header Request Attachment.
+ Simple Data/Params Request Attachment.
+ Simple Multipart File Uploads.
+ CookieJar Support.
+ Redirection History.
+ Redirection Recursion Urllib Fix.
+ Auto Decompression of GZipped Content.
+ Unicode URL Support.
- Simple Authentication:
+ Simple URL + HTTP Auth Registry.
%prep
%setup -q -n requests-%{version}
# For rpmlint warning: remove shebang from python library:
sed -i '/^#!/d' ./requests/certs.py
%if 0%{?suse_version} > 1110 || 0%{?rhel} > 6
%patch0 -p1
%else
%if 0%{?suse_version} == 1110 || (0%{?suse_version} == 1315 && !0%{?is_opensuse})
%patch1 -p1
%else
%patch0 -p1
%endif
%patch2 -p1
rm ./requests/cacert.pem
@@ -85,19 +83,18 @@ rm ./requests/cacert.pem
%build
python setup.py build
# NOTE(toabctl): The test suite currently requires external network access, so
# we can't enable it.
# See # https://github.com/kennethreitz/requests/issues/2184
##check
##python setup.py test
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
rm -rf %{buildroot}%{python_sitelib}/requests/packages
python setup.py install \
--root=%{buildroot} --prefix=%{_prefix}
rm -rf %{buildroot}%{python_sitelib}/requests/packages/
%check
python setup.py test
%files
%defattr(-,root,root)
%doc README.rst HISTORY.rst LICENSE NOTICE
%{python_sitelib}/*
%doc HISTORY.rst LICENSE NOTICE README.rst
%{python_sitelib}/requests/
%{python_sitelib}/requests-*
%changelog