forked from pool/python-requests
Accepting request 108727 from devel:languages:python
Useful Python lib OBS-URL: https://build.opensuse.org/request/show/108727 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-requests?expand=0&rev=1
This commit is contained in:
committed by
Git OBS Bridge
parent
891b8fa2c7
commit
09ef7cfd90
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-requests
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -11,96 +11,67 @@
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
#
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?suse_version} < 1120
|
||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
||||
%endif
|
||||
|
||||
Name: python-requests
|
||||
Version: 2.10.0
|
||||
Version: 0.10.8
|
||||
Release: 0
|
||||
Url: http://python-requests.org
|
||||
Summary: Awesome Python HTTP Library That's Actually Usable
|
||||
License: Apache-2.0
|
||||
License: ISC
|
||||
Group: Development/Languages/Python
|
||||
Url: http://python-requests.org/
|
||||
Source: https://pypi.io/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-UPSTREAM update urllib3 to do the proper passthrough to set_default_verify_paths
|
||||
Patch1: urllib3-ssl-default-context.patch
|
||||
Source: http://pypi.python.org/packages/source/r/requests/requests-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: python
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-py
|
||||
BuildRequires: python-setuptools
|
||||
Requires: python
|
||||
# requirements for pyopenssl fallback of bundled urllib3
|
||||
Recommends: python-ndg-httpsclient
|
||||
Recommends: python-pyOpenSSL
|
||||
Recommends: python-pyasn1
|
||||
%if 0%{?suse_version} <= 1200
|
||||
BuildRequires: openssl-certs
|
||||
Requires: openssl-certs
|
||||
Requires: python-certifi
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%else
|
||||
BuildRequires: ca-certificates
|
||||
Requires: ca-certificates
|
||||
%endif
|
||||
# for good measure, at least recommend an actual set of certificates
|
||||
Recommends: ca-certificates-mozilla
|
||||
%if 0%{?suse_version} >= 1120
|
||||
BuildArch: noarch
|
||||
%else
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%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}
|
||||
%patch0 -p1
|
||||
pushd requests/packages
|
||||
%patch1 -p1
|
||||
popd
|
||||
rm -f requests/cacert.pem
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
|
||||
%install
|
||||
python setup.py install \
|
||||
--root=%{buildroot} --prefix=%{_prefix}
|
||||
|
||||
# Tests require network access.
|
||||
# %check
|
||||
# python test_requests.py
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc HISTORY.rst LICENSE NOTICE README.rst
|
||||
%{python_sitelib}/requests/
|
||||
%{python_sitelib}/requests-*
|
||||
%doc README.rst HISTORY.rst LICENSE NOTICE
|
||||
%{python_sitelib}/*
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user