- 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
This commit is contained in:
parent
11080ed48a
commit
2b5c82d4b2
@ -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>
|
Fri Nov 23 21:34:10 UTC 2018 - Arun Persaud <arun@gmx.de>
|
||||||
|
|
||||||
|
@ -17,11 +17,17 @@
|
|||||||
|
|
||||||
|
|
||||||
%global flavor @BUILD_FLAVOR@%{nil}
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
%define test 0
|
|
||||||
%if "%{flavor}" == "test"
|
%if "%{flavor}" == "test"
|
||||||
%define test 1
|
%bcond_without test
|
||||||
|
%else
|
||||||
|
%bcond_with test
|
||||||
%endif
|
%endif
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
|
%if %{with test}
|
||||||
|
Name: python-requests-%{flavor}
|
||||||
|
%else
|
||||||
|
Name: python-requests
|
||||||
|
%endif
|
||||||
Version: 2.20.1
|
Version: 2.20.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python HTTP Library
|
Summary: Python HTTP Library
|
||||||
@ -50,12 +56,7 @@ Recommends: python-PySocks >= 1.5.6
|
|||||||
Recommends: python-cryptography >= 1.3.4
|
Recommends: python-cryptography >= 1.3.4
|
||||||
Recommends: python-pyOpenSSL >= 0.14
|
Recommends: python-pyOpenSSL >= 0.14
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%if %{test}
|
%if %{with test}
|
||||||
Name: python-requests-%{flavor}
|
|
||||||
%else
|
|
||||||
Name: python-requests
|
|
||||||
%endif
|
|
||||||
%if %{test}
|
|
||||||
BuildRequires: %{python_module PySocks >= 1.5.6}
|
BuildRequires: %{python_module PySocks >= 1.5.6}
|
||||||
BuildRequires: %{python_module chardet >= 3.0.2}
|
BuildRequires: %{python_module chardet >= 3.0.2}
|
||||||
BuildRequires: %{python_module idna < 2.8}
|
BuildRequires: %{python_module idna < 2.8}
|
||||||
@ -102,22 +103,21 @@ sed -i "s#\(httpbin.*\), 'never'#\1#" tests/test_requests.py
|
|||||||
%python_install
|
%python_install
|
||||||
# check that urllib3 is not installed
|
# check that urllib3 is not installed
|
||||||
test ! -e %{buildroot}%{python3_sitelib}/requests/packages/urllib3
|
test ! -e %{buildroot}%{python3_sitelib}/requests/packages/urllib3
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}/requests
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}/
|
||||||
%if %{test}
|
%if %{with test}
|
||||||
%python_expand rm -Rf %{buildroot}%{$python_sitelib}/requests
|
%python_expand rm -Rf %{buildroot}%{$python_sitelib}/requests*
|
||||||
%python_expand rm -Rf %{buildroot}%{$python_sitelib}/requests-*
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# NOTE(aplanas) If we do not have the certificates, we some of the
|
# 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
|
# 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
|
%check
|
||||||
touch Pipfile
|
touch Pipfile
|
||||||
# exclude tests connecting to TARPIT
|
# exclude tests connecting to TARPIT
|
||||||
%python_exec -m pytest tests -k "not (TestTimeout and connect)"
|
%python_exec -m pytest tests -k "not (TestTimeout and connect)"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{test}
|
%if %{with test}
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%else
|
%else
|
||||||
|
Loading…
Reference in New Issue
Block a user