Accepting request 967156 from home:bnavigator:branches:devel:languages:python
- Remove unbundling off ssl.match_hostname. * It was only done for the primary python3 flavor * It is bundled for a reason gh#urllib3/urllib3#2439, gh#urllib3/urllib3#2448 * The tests (and probably urllib3 users) use wildcard patterns not supported by the stdlib - Fix undbundling of six for all flavors - Replace brotlipy recommendation and test with python-Brotli (see release notes below) OBS-URL: https://build.opensuse.org/request/show/967156 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=131
This commit is contained in:
parent
51cc811858
commit
8b7b942d17
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 5 19:54:39 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Remove unbundling off ssl.match_hostname.
|
||||
* It was only done for the primary python3 flavor
|
||||
* It is bundled for a reason gh#urllib3/urllib3#2439,
|
||||
gh#urllib3/urllib3#2448
|
||||
* The tests (and probably urllib3 users) use wildcard patterns
|
||||
not supported by the stdlib
|
||||
- Fix undbundling of six for all flavors
|
||||
- Replace brotlipy recommendation and test with python-Brotli
|
||||
(see release notes below)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 29 11:48:27 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%{?!python_module:%define python_module() python3-%{**}}
|
||||
%define skip_python2 1
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
@ -34,11 +34,10 @@ License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://urllib3.readthedocs.org/
|
||||
Source: https://files.pythonhosted.org/packages/source/u/urllib3/urllib3-%{version}.tar.gz
|
||||
# Wrapper for ssl to unbundle ssl_match_hostname
|
||||
Source1: ssl_match_hostname_py3.py
|
||||
# PATCH-FIX-UPSTREAM remove_mock.patch gh#urllib3/urllib3#2108 mcepl@suse.com
|
||||
# remove dependency on the external module mock
|
||||
Patch0: remove_mock.patch
|
||||
BuildRequires: %{python_module base >= 3.7}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module six}
|
||||
BuildRequires: fdupes
|
||||
@ -50,12 +49,12 @@ Requires: python-cryptography >= 1.3.4
|
||||
Requires: python-idna >= 2.0.0
|
||||
Requires: python-pyOpenSSL >= 0.14
|
||||
Requires: python-six >= 1.12.0
|
||||
Recommends: python-Brotli >= 1.0.9
|
||||
Recommends: python-PySocks >= 1.5.6
|
||||
Recommends: python-brotlipy >= 0.6.0
|
||||
BuildArch: noarch
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module Brotli >= 1.0.9}
|
||||
BuildRequires: %{python_module PySocks >= 1.5.6}
|
||||
BuildRequires: %{python_module brotlipy >= 0.6.0}
|
||||
BuildRequires: %{python_module certifi}
|
||||
BuildRequires: %{python_module cryptography >= 1.3.4}
|
||||
BuildRequires: %{python_module dateutil}
|
||||
@ -108,35 +107,26 @@ rm -r test/appengine/
|
||||
%if !%{with test}
|
||||
%python_install
|
||||
|
||||
# Unbundle the Python 3 build
|
||||
rm %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py
|
||||
rm -r %{buildroot}/%{python3_sitelib}/urllib3/util/ssl_match_hostname.py
|
||||
%{python_expand # Unbundle six
|
||||
rm %{buildroot}/%{$python_sitelib}/urllib3/packages/six.py
|
||||
rm %{buildroot}/%{$python_sitelib}/urllib3/packages/__pycache__/six*.pyc
|
||||
|
||||
# Copy ssl_match_hostname.py before compilation, so we can have a pyc too
|
||||
cp -a %{SOURCE1} %{buildroot}/%{python3_sitelib}/urllib3/util/ssl_match_hostname.py
|
||||
ln -s %{$python_sitelib}/six.py %{buildroot}/%{$python_sitelib}/urllib3/packages/six.py
|
||||
ln -sf %{$python_sitelib}/__pycache__/six.cpython-%{$python_version_nodots}.opt-1.pyc \
|
||||
%{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/
|
||||
ln -sf %{$python_sitelib}/__pycache__/six.cpython-%{$python_version_nodots}.pyc \
|
||||
%{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/
|
||||
|
||||
%{python_expand \
|
||||
$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/urllib3/
|
||||
$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/urllib3/
|
||||
%fdupes %{buildroot}%{$python_sitelib}
|
||||
}
|
||||
|
||||
ln -s %{python3_sitelib}/six.py %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py
|
||||
ln -sf %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.opt-1.pyc \
|
||||
%{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/
|
||||
ln -sf %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.pyc \
|
||||
%{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/
|
||||
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
%endif
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
# gh#urllib3/urllib3#2109
|
||||
export CI="true"
|
||||
# still broken with new ssl
|
||||
skiplist='test_import_urllib3'
|
||||
# skip some randomly failing tests (mostly on i586, but sometimes they fail on other architectures)
|
||||
skiplist+=" or test_ssl_read_timeout or test_ssl_failed_fingerprint_verification or test_ssl_custom_validation_failure_terminates"
|
||||
skiplist="test_ssl_read_timeout or test_ssl_failed_fingerprint_verification or test_ssl_custom_validation_failure_terminates"
|
||||
# gh#urllib3/urllib3#1752 and others: upstream's way of checking that the build
|
||||
# system has a correct system time breaks (re-)building the package after too
|
||||
# many months have passed since the last release.
|
||||
|
@ -1 +0,0 @@
|
||||
from ssl import match_hostname, CertificateError
|
Loading…
x
Reference in New Issue
Block a user