14
0
Jan Matejek
2016-02-23 15:37:33 +00:00
committed by Git OBS Bridge
parent 60197780b7
commit ee0d6bcb47
5 changed files with 70 additions and 23 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-requests
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,30 +16,36 @@
#
%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.8.1
Version: 2.9.1
Release: 0
Summary: Awesome Python HTTP Library That's Actually Usable
License: Apache-2.0
Group: Development/Languages/Python
Url: http://python-requests.org
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
# PATCH-FIX-OPENSUSE no-default-cacert.patch -- Completely ignore the internal CA bundle.
Patch0: no-default-cacert.patch
BuildRequires: python
BuildRequires: python-devel
BuildRequires: python-py
BuildRequires: python-setuptools
Requires: python
# really needed?
# Really needed?
#Requires: python-ndg-httpsclient
Requires: python-pyOpenSSL
Requires: python-pyasn1
%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
%if 0%{?suse_version} >= 1120 && !(0%{?suse_version} == 1315 && !0%{?is_opensuse})
BuildRequires: ca-certificates
Requires: ca-certificates
%endif
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%else
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
%description
@@ -67,10 +73,10 @@ Features:
%prep
%setup -q -n requests-%{version}
# For rpmlint warning: remove shebang from python library:
sed -i '/^#!/d' ./requests/certs.py
%if 0%{?suse_version} >= 1120 && !(0%{?suse_version} == 1315 && !0%{?is_opensuse})
%patch0 -p1
rm ./requests/cacert.pem
rm -f requests/cacert.pem
%endif
%build
python setup.py build
@@ -79,8 +85,9 @@ python setup.py build
python setup.py install \
--root=%{buildroot} --prefix=%{_prefix}
%check
python setup.py test
# Tests require network access.
# %check
# python test_requests.py
%files
%defattr(-,root,root)