Accepting request 844561 from home:PSuarezHernandez:branches:devel:languages:python

- Do not build Python2 subpackage since 3.2.0 does not support Python2
- Adjust skipped SSH unit tests when paramiko <= 2.7.0  
- Add:
  * skip-some-tests-for-older-paramiko-versions.patch

OBS-URL: https://build.opensuse.org/request/show/844561
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-apache-libcloud?expand=0&rev=105
This commit is contained in:
Matej Cepl 2020-10-29 15:28:58 +00:00 committed by Git OBS Bridge
parent 853b1ebbc4
commit 0f774a6840
3 changed files with 47 additions and 2 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Oct 28 13:45:19 UTC 2020 - Pablo Suárez Hernández <pablo.suarezhernandez@suse.com>
- Do not build Python2 subpackage since 3.2.0 does not support Python2
- Adjust skipped SSH unit tests when paramiko <= 2.7.0
- Add:
* skip-some-tests-for-older-paramiko-versions.patch
-------------------------------------------------------------------
Wed Oct 21 01:17:39 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>

View File

@ -16,6 +16,9 @@
#
# No longer build for python2
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-apache-libcloud
@ -23,10 +26,13 @@ Version: 3.2.0
Release: 0
Summary: Abstraction over multiple cloud provider APIs
License: Apache-2.0
Group: Development/Languages/Python
URL: https://libcloud.apache.org
Source0: https://files.pythonhosted.org/packages/source/a/apache-libcloud/apache-libcloud-%{version}.tar.gz
Patch1: gce_image_projects.patch
Patch2: ec2_create_node.patch
Patch3: skip-some-tests-for-older-paramiko-versions.patch
BuildRequires: %{python_module libvirt-python}
BuildRequires: %{python_module lockfile}
BuildRequires: %{python_module lxml}
@ -51,8 +57,6 @@ BuildArch: noarch
%if %{with python2}
BuildRequires: python-backports.ssl_match_hostname
BuildRequires: python2
%endif
%ifpython2
Requires: python-backports.ssl_match_hostname
%endif
%python_subpackages
@ -65,6 +69,7 @@ differences among multiple cloud provider APIs.
%setup -q -n apache-libcloud-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
sed -i '/^#!/d' demos/gce_demo.py
chmod a-x demos/gce_demo.py
# Setup tests

View File

@ -0,0 +1,31 @@
Index: apache-libcloud-3.2.0/libcloud/test/compute/test_ssh_client.py
===================================================================
--- apache-libcloud-3.2.0.orig/libcloud/test/compute/test_ssh_client.py
+++ apache-libcloud-3.2.0/libcloud/test/compute/test_ssh_client.py
@@ -168,6 +168,8 @@ class ParamikoSSHClientTests(LibcloudTes
expected_msg, mock.connect)
@patch('paramiko.SSHClient', Mock)
+ @unittest.skipIf(paramiko_version < '2.7.0',
+ 'Old versions of paramiko do not support OPENSSH key format')
def test_password_protected_key_no_password_provided_1(self):
path = os.path.join(os.path.dirname(__file__),
'fixtures', 'misc',
@@ -198,6 +200,8 @@ class ParamikoSSHClientTests(LibcloudTes
expected_msg, mock.connect)
@patch('paramiko.SSHClient', Mock)
+ @unittest.skipIf(paramiko_version < '2.7.0',
+ 'Old versions of paramiko do not support OPENSSH key format')
def test_password_protected_key_no_password_provided_2(self):
path = os.path.join(os.path.dirname(__file__),
'fixtures', 'misc',
@@ -219,6 +223,8 @@ class ParamikoSSHClientTests(LibcloudTes
expected_msg, mock.connect)
@patch('paramiko.SSHClient', Mock)
+ @unittest.skipIf(paramiko_version < '2.7.0',
+ 'Old versions of paramiko do not support OPENSSH key format')
def test_password_protected_key_valid_password_provided(self):
path = os.path.join(os.path.dirname(__file__),
'fixtures', 'misc',