Accepting request 662199 from devel:languages:python
- Move name ahead of version in spec file to resolve build issues on older distributions - fdupe more thoroughly. OBS-URL: https://build.opensuse.org/request/show/662199 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-requests?expand=0&rev=54
This commit is contained in:
commit
8c21e9cea5
@ -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 <arun@gmx.de>
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user