Dirk Mueller 2022-01-10 23:52:50 +00:00 committed by Git OBS Bridge
parent 768d17111c
commit d8eb641457
2 changed files with 8 additions and 0 deletions

View File

@ -34,6 +34,8 @@ 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
@ -109,6 +111,11 @@ rm -r test/appengine/
# Unbundle the Python 3 build
rm %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py
rm -r %{buildroot}/%{python3_sitelib}/urllib3/util/ssl_match_hostname.py
# 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
%{python_expand \
$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/urllib3/
$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/urllib3/

View File

@ -0,0 +1 @@
from ssl import match_hostname, CertificateError