From 76a2b046edc8941fb8670ae881975d41101ecc2d267dbc26810ca6fd6ccdd8e0 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 27 Feb 2018 21:50:44 +0000 Subject: [PATCH] Accepting request 580753 from home:aplanas:branches:devel:languages:python - Recommends only for SUSE - In no SUSE evironments some tests related with certificates can fail. Skip the tests if this case. OBS-URL: https://build.opensuse.org/request/show/580753 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=106 --- python-requests.changes | 7 +++++++ python-requests.spec | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/python-requests.changes b/python-requests.changes index 3399762..98ed8b3 100644 --- a/python-requests.changes +++ b/python-requests.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Feb 27 18:08:32 UTC 2018 - aplanas@suse.com + +- Recommends only for SUSE +- In no SUSE evironments some tests related with certificates can + fail. Skip the tests if this case. + ------------------------------------------------------------------- Sun Sep 24 21:48:31 UTC 2017 - arun@gmx.de diff --git a/python-requests.spec b/python-requests.spec index a06b94b..3ac3c7d 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -1,7 +1,7 @@ # # spec file for package python-requests # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 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 @@ -44,10 +44,12 @@ BuildRequires: %{python_module pytest} Requires: ca-certificates Requires: python # for good measure, at least recommend an actual set of certificates +%if 0%{?suse_version} >= 1000 Recommends: ca-certificates-mozilla Recommends: python-pyOpenSSL >= 0.14 Recommends: python-cryptography >= 1.3.4 Recommends: python-PySocks >= 1.5.6 +%endif Requires: python-certifi >= 2017.4.17 Requires: python-chardet >= 3.0.2 Requires: python-idna >= 2.5 @@ -89,10 +91,14 @@ sed -i '1s/^#!.*$//' requests/certs.py # check that urllib3 is not installed test ! -e %{buildroot}%{python3_sitelib}/requests/packages/urllib3 +# NOTE(aplanas) If we do not have the certificates, we some of the +# tests will fail, so for now we only run the tests in openSUSE +%if 0%{?suse_version} %check touch requirements.txt # exclude tests connecting to TARPIT %python_exec -m pytest tests -k "not (TestTimeout and connect)" +%endif %files %{python_files} %defattr(-,root,root)