diff --git a/fix-backports-usage.patch b/fix-backports-usage.patch new file mode 100644 index 0000000..a181aa9 --- /dev/null +++ b/fix-backports-usage.patch @@ -0,0 +1,12 @@ +diff -uNr apache-libcloud-2.0.0.orig/libcloud/utils/py3.py apache-libcloud-2.0.0/libcloud/utils/py3.py +--- apache-libcloud-2.0.0.orig/libcloud/utils/py3.py 2017-09-30 15:18:35.359491824 +0200 ++++ apache-libcloud-2.0.0/libcloud/utils/py3.py 2017-09-30 15:19:00.418868653 +0200 +@@ -68,7 +68,7 @@ + if sys.version_info >= (3, 2) and sys.version_info < (3, 3): + PY32 = True + +-if PY2_pre_279 or PY3_pre_32: ++if PY2 or PY3_pre_32: + try: + from backports.ssl_match_hostname import match_hostname, CertificateError # NOQA + except ImportError: diff --git a/python-apache-libcloud.changes b/python-apache-libcloud.changes index 53c6745..ad53d20 100644 --- a/python-apache-libcloud.changes +++ b/python-apache-libcloud.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Sep 30 13:29:33 UTC 2017 - mc@suse.com + +- fix build on SLE12 by using python-backports +- reduce warnings + ------------------------------------------------------------------- Tue May 16 16:37:05 UTC 2017 - jmatejek@suse.com diff --git a/python-apache-libcloud.spec b/python-apache-libcloud.spec index 0c14dec..ca094e6 100644 --- a/python-apache-libcloud.spec +++ b/python-apache-libcloud.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + #nospeccleaner %{?!python_module:%define python_module() python-%{**} python3-%{**}} @@ -26,10 +27,12 @@ License: Apache-2.0 Group: System/Monitoring Url: https://libcloud.apache.org Source0: https://files.pythonhosted.org/packages/source/a/apache-libcloud/apache-libcloud-%{version}.tar.gz +Patch0: fix-backports-usage.patch BuildRequires: %{python_module lxml} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module xml} BuildRequires: fdupes +BuildRequires: python-backports.ssl_match_hostname BuildRequires: python-rpm-macros %if 0%{?suse_version} >= 1210 BuildRequires: systemd @@ -46,13 +49,14 @@ differences among multiple cloud provider APIs. %prep %setup -q -n apache-libcloud-%{version} +%patch0 -p1 %build %python_build %install %python_install -%fdupes %{buildroot}%{python_sitelib}/libcloud/test/ +%fdupes %{buildroot}%{_prefix} %files %{python_files} %defattr(-,root,root)