From 788e4f3963fce7f78e8e5db98f95d51e9bdb6c7ec564e5853864f9279cdcbc62 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 10 Dec 2018 10:36:44 +0000 Subject: [PATCH 1/3] - avoid using recommends on older distributions OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=117 --- python-requests.changes | 5 +++++ python-requests.spec | 2 ++ 2 files changed, 7 insertions(+) diff --git a/python-requests.changes b/python-requests.changes index f2ec58a..5418d93 100644 --- a/python-requests.changes +++ b/python-requests.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Dec 10 10:36:31 UTC 2018 - Dirk Mueller + +- avoid using recommends on older distributions + ------------------------------------------------------------------- Fri Nov 23 21:34:10 UTC 2018 - Arun Persaud diff --git a/python-requests.spec b/python-requests.spec index 9e2a845..9a1f8fc 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -45,10 +45,12 @@ Requires: python-idna < 2.8 Requires: python-idna >= 2.5 Requires: python-py Requires: python-urllib3 >= 1.21.1 +%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24 Recommends: ca-certificates-mozilla Recommends: python-PySocks >= 1.5.6 Recommends: python-cryptography >= 1.3.4 Recommends: python-pyOpenSSL >= 0.14 +%endif BuildArch: noarch %if %{test} Name: python-requests-%{flavor} From 11080ed48a1f80f0146e1035984e1d70a6b715b2674ff297b11303cbf544f6b6 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 29 Dec 2018 23:47:40 +0000 Subject: [PATCH 2/3] Remove r117 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=118 --- python-requests.changes | 5 ----- python-requests.spec | 2 -- 2 files changed, 7 deletions(-) diff --git a/python-requests.changes b/python-requests.changes index 5418d93..f2ec58a 100644 --- a/python-requests.changes +++ b/python-requests.changes @@ -1,8 +1,3 @@ -------------------------------------------------------------------- -Mon Dec 10 10:36:31 UTC 2018 - Dirk Mueller - -- avoid using recommends on older distributions - ------------------------------------------------------------------- Fri Nov 23 21:34:10 UTC 2018 - Arun Persaud diff --git a/python-requests.spec b/python-requests.spec index 9a1f8fc..9e2a845 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -45,12 +45,10 @@ Requires: python-idna < 2.8 Requires: python-idna >= 2.5 Requires: python-py Requires: python-urllib3 >= 1.21.1 -%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24 Recommends: ca-certificates-mozilla Recommends: python-PySocks >= 1.5.6 Recommends: python-cryptography >= 1.3.4 Recommends: python-pyOpenSSL >= 0.14 -%endif BuildArch: noarch %if %{test} Name: python-requests-%{flavor} From 2b5c82d4b2c4db77e0cc48407c1c6fc785f9a00fb61301a77c365f8823c2a6dc Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 31 Dec 2018 11:25:50 +0000 Subject: [PATCH 3/3] - Move name ahead of version in spec file to resolve build issues on older distributions - fdupe more thoroughly. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=119 --- python-requests.changes | 7 +++++++ python-requests.spec | 28 ++++++++++++++-------------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/python-requests.changes b/python-requests.changes index f2ec58a..506015e 100644 --- a/python-requests.changes +++ b/python-requests.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Dec 31 12:24:10 CET 2018 - mcepl@suse.com + +- Move name ahead of version in spec file to resolve build issues + on older distributions +- fdupe more thoroughly. + ------------------------------------------------------------------- Fri Nov 23 21:34:10 UTC 2018 - Arun Persaud diff --git a/python-requests.spec b/python-requests.spec index 9e2a845..1d58f89 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -17,11 +17,17 @@ %global flavor @BUILD_FLAVOR@%{nil} -%define test 0 %if "%{flavor}" == "test" -%define test 1 +%bcond_without test +%else +%bcond_with test %endif %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%if %{with test} +Name: python-requests-%{flavor} +%else +Name: python-requests +%endif Version: 2.20.1 Release: 0 Summary: Python HTTP Library @@ -50,12 +56,7 @@ Recommends: python-PySocks >= 1.5.6 Recommends: python-cryptography >= 1.3.4 Recommends: python-pyOpenSSL >= 0.14 BuildArch: noarch -%if %{test} -Name: python-requests-%{flavor} -%else -Name: python-requests -%endif -%if %{test} +%if %{with test} BuildRequires: %{python_module PySocks >= 1.5.6} BuildRequires: %{python_module chardet >= 3.0.2} BuildRequires: %{python_module idna < 2.8} @@ -102,22 +103,21 @@ sed -i "s#\(httpbin.*\), 'never'#\1#" tests/test_requests.py %python_install # check that urllib3 is not installed test ! -e %{buildroot}%{python3_sitelib}/requests/packages/urllib3 -%python_expand %fdupes %{buildroot}%{$python_sitelib}/requests -%if %{test} -%python_expand rm -Rf %{buildroot}%{$python_sitelib}/requests -%python_expand rm -Rf %{buildroot}%{$python_sitelib}/requests-* +%python_expand %fdupes %{buildroot}%{$python_sitelib}/ +%if %{with test} +%python_expand rm -Rf %{buildroot}%{$python_sitelib}/requests* %endif # 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} && %{test} +%if 0%{?suse_version} && %{with test} %check touch Pipfile # exclude tests connecting to TARPIT %python_exec -m pytest tests -k "not (TestTimeout and connect)" %endif -%if %{test} +%if %{with test} %files %{python_files} %license LICENSE %else