- Update to 2.21.0:

* Update various dependencies to match reality
- Update the reqs based on upstream
- Fix the multibuild to match other packages

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=125
This commit is contained in:
Tomáš Chvátal 2019-02-15 11:41:38 +00:00 committed by Git OBS Bridge
parent 05c79ceb31
commit 7dbc844192
2 changed files with 15 additions and 18 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Feb 15 11:41:05 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Do not depend on python-py
- Update few of the requirements
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Feb 5 13:17:10 UTC 2019 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com> Tue Feb 5 13:17:10 UTC 2019 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>

View File

@ -18,16 +18,14 @@
%global flavor @BUILD_FLAVOR@%{nil} %global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test" %if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test %bcond_without test
%else %else
%define psuffix %{nil}
%bcond_with test %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%{psuffix}
Name: python-requests-%{flavor}
%else
Name: python-requests
%endif
Version: 2.21.0 Version: 2.21.0
Release: 0 Release: 0
Summary: Python HTTP Library Summary: Python HTTP Library
@ -36,7 +34,6 @@ Group: Development/Languages/Python
URL: http://python-requests.org/ URL: http://python-requests.org/
Source: https://files.pythonhosted.org/packages/source/r/requests/requests-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/r/requests/requests-%{version}.tar.gz
BuildRequires: %{python_module certifi} BuildRequires: %{python_module certifi}
BuildRequires: %{python_module py}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module urllib3 >= 1.21.1} BuildRequires: %{python_module urllib3 >= 1.21.1}
BuildRequires: ca-certificates BuildRequires: ca-certificates
@ -47,10 +44,10 @@ Requires: ca-certificates
Requires: python Requires: python
Requires: python-certifi >= 2017.4.17 Requires: python-certifi >= 2017.4.17
Requires: python-chardet >= 3.0.2 Requires: python-chardet >= 3.0.2
Requires: python-idna < 2.8
Requires: python-idna >= 2.5 Requires: python-idna >= 2.5
Requires: python-py Requires: python-py
Requires: python-urllib3 >= 1.21.1 Requires: python-urllib3 >= 1.21.1
BuildArch: noarch
%if 0%{?_no_weakdeps} %if 0%{?_no_weakdeps}
Requires: ca-certificates-mozilla Requires: ca-certificates-mozilla
Requires: python-PySocks >= 1.5.6 Requires: python-PySocks >= 1.5.6
@ -62,16 +59,14 @@ 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
%endif %endif
BuildArch: noarch
%if %{with test} %if %{with 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.5} BuildRequires: %{python_module idna >= 2.5}
BuildRequires: %{python_module pytest-httpbin} BuildRequires: %{python_module pytest-httpbin >= 0.0.7}
BuildRequires: %{python_module pytest-mock} BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
Requires: this-is-only-for-build-envs BuildRequires: %{python_module requests >= %{version}}
%endif %endif
%python_subpackages %python_subpackages
@ -107,12 +102,11 @@ sed -i "s#\(httpbin.*\), 'never'#\1#" tests/test_requests.py
%python_build %python_build
%install %install
%if !%{with test}
%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}/ %python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%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
@ -124,10 +118,7 @@ touch Pipfile
%python_exec -m pytest tests -k "not (TestTimeout and connect)" %python_exec -m pytest tests -k "not (TestTimeout and connect)"
%endif %endif
%if %{with test} %if !%{with test}
%files %{python_files}
%license LICENSE
%else
%files %{python_files} %files %{python_files}
%license LICENSE %license LICENSE
%doc HISTORY.md README.md %doc HISTORY.md README.md