2013-01-28 16:04:17 +01:00
#
# spec file for package python-apache-libcloud
#
2021-02-01 22:09:41 +01:00
# Copyright (c) 2021 SUSE LLC
2013-01-28 16:04:17 +01:00
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
2019-09-18 13:14:48 +02:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2013-07-01 20:20:32 +02:00
#
2013-01-28 16:04:17 +01:00
2017-09-30 21:28:09 +02:00
2020-10-29 16:28:58 +01:00
# No longer build for python2
%define skip_python2 1
2017-05-16 18:37:37 +02:00
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
2013-01-28 16:09:52 +01:00
Name : python-apache-libcloud
2021-02-01 22:09:41 +01:00
Version : 3.3.1
2013-10-24 12:58:47 +02:00
Release : 0
2018-06-07 08:51:22 +02:00
Summary : Abstraction over multiple cloud provider APIs
2013-10-24 12:58:47 +02:00
License : Apache-2.0
2020-10-29 16:28:58 +01:00
Group : Development/Languages/Python
2019-09-18 13:14:48 +02:00
URL : https://libcloud.apache.org
2017-05-16 18:44:39 +02:00
Source0 : https://files.pythonhosted.org/packages/source/a/apache-libcloud/apache-libcloud-%{version} .tar.gz
2020-02-22 08:30:59 +01:00
Patch1 : gce_image_projects.patch
2018-09-28 22:50:48 +02:00
Patch2 : ec2_create_node.patch
2020-10-29 16:28:58 +01:00
Patch3 : skip-some-tests-for-older-paramiko-versions.patch
2019-03-02 09:50:58 +01:00
BuildRequires : %{python_module libvirt-python}
BuildRequires : %{python_module lockfile}
2017-05-16 18:37:37 +02:00
BuildRequires : %{python_module lxml}
2019-03-02 09:50:58 +01:00
BuildRequires : %{python_module mock}
BuildRequires : %{python_module paramiko}
2020-10-30 12:45:28 +01:00
BuildRequires : %{python_module pyOpenSSL}
2019-03-02 09:50:58 +01:00
BuildRequires : %{python_module pytest-runner}
BuildRequires : %{python_module pytest}
BuildRequires : %{python_module requests-mock}
2017-05-16 18:37:37 +02:00
BuildRequires : %{python_module setuptools}
2019-12-13 15:27:19 +01:00
BuildRequires : %{python_module typing}
2017-05-16 18:37:37 +02:00
BuildRequires : %{python_module xml}
2013-07-01 20:20:32 +02:00
BuildRequires : fdupes
2017-05-16 18:37:37 +02:00
BuildRequires : python-rpm-macros
Requires : python-lxml
Requires : python-requests
2019-12-13 15:27:19 +01:00
Requires : python-typing
2019-03-02 09:50:58 +01:00
Suggests : python-libvirt-python
Suggests : python-lockfile
2019-09-18 13:14:48 +02:00
Suggests : python-paramiko
2019-03-02 09:50:58 +01:00
Suggests : python-pysphere
2018-08-16 12:46:08 +02:00
BuildArch : noarch
2017-05-16 18:37:37 +02:00
%python_subpackages
2013-01-28 16:04:17 +01:00
%description
2017-05-16 18:37:37 +02:00
Apache Libcloud is a standard Python library that abstracts away
2013-07-01 20:20:32 +02:00
differences among multiple cloud provider APIs.
2013-01-28 16:04:17 +01:00
%prep
%setup -q -n apache-libcloud-%{version}
2020-02-22 08:30:59 +01:00
%patch1 -p1
2018-09-28 22:50:48 +02:00
%patch2 -p1
2020-10-29 16:28:58 +01:00
%patch3 -p1
2019-03-02 09:50:58 +01:00
sed -i '/^#!/d' demos/gce_demo.py
chmod a-x demos/gce_demo.py
# Setup tests
cp libcloud/test/secrets.py-dist libcloud/test/secrets.py
2013-01-28 16:04:17 +01:00
%build
2017-05-16 18:37:37 +02:00
%python_build
2013-01-28 16:04:17 +01:00
%install
2017-05-16 18:37:37 +02:00
%python_install
2018-08-16 12:46:08 +02:00
find %{buildroot} -name '*.DS_Store' -delete
find %{buildroot} -name '*.json' -size 0 -delete
find %{buildroot} -name '*.pem' -size 0 -delete
2019-09-18 13:23:27 +02:00
%python_expand rm -r %{buildroot} %{$python_sitelib}/libcloud/test
%python_expand %fdupes %{buildroot} %{$python_sitelib}
2013-01-28 16:04:17 +01:00
2019-03-02 09:50:58 +01:00
%check
2021-02-01 22:09:41 +01:00
# Skip OvhTests::test_list_nodes_invalid_region which tries to reach OVH servers
2019-03-02 09:50:58 +01:00
# Skip ShellOutSSHClientTests tests which attempt to ssh to localhost
2020-10-30 15:58:04 +01:00
# Skip test_key_file_non_pem_format_error since OpenSSH support is backported for SLE python-paramiko < 2.7.0
2020-10-30 12:45:28 +01:00
# Note these four extra py3 failures are undesirable and should be fixed: fail in s390 and ppc64
2021-02-01 22:09:41 +01:00
%pytest -k '(not test_consume_stderr_chunk_contains_part_of_multi_byte_utf8_character and not test_consume_stdout_chunk_contains_part_of_multi_byte_utf8_character and not test_consume_stdout_chunk_contains_non_utf8_character and not test_consume_stderr_chunk_contains_non_utf8_character and not test_key_file_non_pem_format_error and not ShellOutSSHClientTests and not ElasticContainerDriverTestCase and not test_list_nodes_invalid_region)'
2019-03-02 09:50:58 +01:00
2017-05-16 18:37:37 +02:00
%files %{python_files}
2018-05-02 17:36:50 +02:00
%license LICENSE
2019-03-02 09:50:58 +01:00
%doc CHANGES.rst README.rst demos/ example_*.py
2013-01-28 16:04:17 +01:00
%{python_sitelib} /*
%changelog