From 2afa4fbe4be41794fefec7f4acf0ba0c05027ee8a385b0c60fc5b6c82d7baf60 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 21 Apr 2020 18:33:32 +0000 Subject: [PATCH 1/3] Explicitly switch off python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=94 --- python-urllib3.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/python-urllib3.spec b/python-urllib3.spec index 75f5f51..3d4ce48 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -17,6 +17,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define skip_python2 1 %define oldpython python %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "test" From 1d31fde45a9fa05c96f62be5111ee04f43da08f08be2fcb513f72835a48d6263 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 21 Apr 2020 21:07:42 +0000 Subject: [PATCH 2/3] - Explicitly switch off building python 2 version. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=95 --- python-urllib3.changes | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python-urllib3.changes b/python-urllib3.changes index 4c37636..be34ba5 100644 --- a/python-urllib3.changes +++ b/python-urllib3.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 21 21:07:06 UTC 2020 - Matej Cepl + +- Explicitly switch off building python 2 version. + ------------------------------------------------------------------- Fri Feb 7 15:24:03 UTC 2020 - Marketa Calabkova From 52870d7ca28c2598dda6c86d16e9eaf2d30cd2bb9cd75a6d3692fcb1954453a8 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 22 Apr 2020 06:26:09 +0000 Subject: [PATCH 3/3] Remove all remaints of python 2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=96 --- python-urllib3.spec | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/python-urllib3.spec b/python-urllib3.spec index 3d4ce48..d6b9d57 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -27,7 +27,6 @@ %define psuffix %{nil} %bcond_with test %endif -%bcond_without python2 Name: python-urllib3%{psuffix} Version: 1.25.8 Release: 0 @@ -54,13 +53,6 @@ BuildArch: noarch %if 0%{?suse_version} < 1500 BuildRequires: %{oldpython} %endif -%if %{with python2} -BuildRequires: python-backports.ssl_match_hostname -BuildRequires: python-ipaddress -%endif -%ifpython2 -Requires: python-backports.ssl_match_hostname -%endif %if %{with test} BuildRequires: %{python_module PySocks} BuildRequires: %{python_module brotlipy >= 0.6.0} @@ -75,15 +67,8 @@ BuildRequires: %{python_module tornado < 6} BuildRequires: %{python_module trustme >= 0.5.3} BuildRequires: %{python_module urllib3 >= %{version}} %endif -%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24 Recommends: python-PySocks >= 1.5.6 Recommends: python-brotlipy >= 0.6.0 -%endif -%ifpython2 -Requires: python-ipaddress -Obsoletes: python-urllib3 <= %{version} -Provides: python-urllib3 = %{version} -%endif %python_subpackages %description @@ -125,20 +110,6 @@ $python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/urlli $python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/urllib3/ } -%if 0%{?have_python2} && ! 0%{?skip_python2} -# Unbundle the Python 2 build -rm -rf %{buildroot}/%{python2_sitelib}/urllib3/packages/six.py* -rm -rf %{buildroot}/%{python2_sitelib}/urllib3/packages/ssl_match_hostname/ - -mkdir -p %{buildroot}/%{python2_sitelib}/urllib3/packages/ -ln -s %{python2_sitelib}/six.py %{buildroot}/%{python2_sitelib}/urllib3/packages/six.py -ln -s %{python2_sitelib}/six.pyc %{buildroot}/%{python2_sitelib}/urllib3/packages/six.pyc -ln -s %{python2_sitelib}/six.pyo %{buildroot}/%{python2_sitelib}/urllib3/packages/six.pyo -ln -s %{python2_sitelib}/backports/ssl_match_hostname \ - %{buildroot}/%{python2_sitelib}/urllib3/packages/ssl_match_hostname -%endif - -%if 0%{?have_python3} && ! 0%{?skip_python3} # Unbundle the Python 3 build rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py* rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/six* @@ -151,23 +122,10 @@ ln -s %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.opt-1 %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/ ln -s %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.pyc \ %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/ -%endif %python_expand %fdupes %{buildroot}%{$python_sitelib} %endif -%if ! %{with test} && "%{python_flavor}" == "python2" -%pre -n python2-urllib3 - SITELIB=%{python2_sitelib} - CONFLICTED="${SITELIB}/urllib3/packages/ssl_match_hostname" - if [ -d "$CONFLICTED" -a ! -L "$CONFLICTED" ] ; then - # Change from directory to symlink - rm -rfv "$CONFLICTED" - ln -s ../../backports/ssl_match_hostname \ - $CONFLICTED - fi -%endif - %if %{with test} %check skiplist='not test_select_interrupt_exception and not test_selector_error and not timeout and not test_request_host_header_ignores_fqdn_dot and not test_dotted_fqdn and not TestImportWithoutSSL'