diff --git a/python-urllib3.spec b/python-urllib3.spec index 276c03b..afa79c8 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -26,13 +26,14 @@ %define psuffix %{nil} %bcond_with test %endif +%bcond_without python2 Name: python-urllib3%{psuffix} Version: 1.25.3 Release: 0 Summary: HTTP library with thread-safe connection pooling, file post, and more License: MIT Group: Development/Languages/Python -URL: http://urllib3.readthedocs.org/ +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 @@ -41,10 +42,6 @@ Source1: ssl_match_hostname_py3.py Patch0: urllib3-ssl-default-context.patch # PATCH-FIX-UPSTREAM python-urllib3-recent-date.patch gh#shazow/urllib3#1303, boo#1074247 dimstar@opensuse.org -- Fix test suite, use correct date Patch1: python-urllib3-recent-date.patch -# for SSL module on older distros -%if 0%{?suse_version} < 1500 -BuildRequires: %{oldpython} -%endif BuildRequires: %{python_module PySocks} BuildRequires: %{python_module psutil} BuildRequires: %{python_module rfc3986} @@ -52,10 +49,6 @@ BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: fdupes BuildRequires: python-rpm-macros -%if 0%{?have_python2} && ! 0%{?skip_python2} -BuildRequires: python-backports.ssl_match_hostname -BuildRequires: python2-ipaddress -%endif #!BuildIgnore: python-requests Requires: ca-certificates-mozilla Requires: python-cryptography @@ -64,6 +57,14 @@ Requires: python-pyOpenSSL Requires: python-rfc3986 Requires: python-six BuildArch: noarch +# for SSL module on older distros +%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