2013-01-28 15:04:17 +00:00
#
# spec file for package python-apache-libcloud
#
2020-01-16 19:25:37 +00:00
# Copyright (c) 2020 SUSE LLC
2013-01-28 15:04:17 +00: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 11:14:48 +00:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2013-07-01 18:20:32 +00:00
#
2013-01-28 15:04:17 +00:00
2017-09-30 19:28:09 +00:00
2020-10-29 15:28:58 +00:00
# No longer build for python2
%define skip_python2 1
2017-05-16 16:37:37 +00:00
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
2020-11-03 13:45:07 +00:00
%bcond_with python2
2013-01-28 15:09:52 +00:00
Name : python-apache-libcloud
2020-10-21 01:21:56 +00:00
Version : 3.2.0
2013-10-24 10:58:47 +00:00
Release : 0
2018-06-07 06:51:22 +00:00
Summary : Abstraction over multiple cloud provider APIs
2013-10-24 10:58:47 +00:00
License : Apache-2.0
2020-10-29 15:28:58 +00:00
Group : Development/Languages/Python
2019-09-18 11:14:48 +00:00
URL : https://libcloud.apache.org
2017-05-16 16:44:39 +00:00
Source0 : https://files.pythonhosted.org/packages/source/a/apache-libcloud/apache-libcloud-%{version} .tar.gz
2020-02-22 07:30:59 +00:00
Patch1 : gce_image_projects.patch
2018-09-28 20:50:48 +00:00
Patch2 : ec2_create_node.patch
2020-10-29 15:28:58 +00:00
Patch3 : skip-some-tests-for-older-paramiko-versions.patch
2019-03-02 08:50:58 +00:00
BuildRequires : %{python_module libvirt-python}
BuildRequires : %{python_module lockfile}
2017-05-16 16:37:37 +00:00
BuildRequires : %{python_module lxml}
2019-03-02 08:50:58 +00:00
BuildRequires : %{python_module mock}
BuildRequires : %{python_module paramiko}
2020-10-30 11:45:28 +00:00
BuildRequires : %{python_module pyOpenSSL}
2019-03-02 08:50:58 +00:00
BuildRequires : %{python_module pytest-runner}
BuildRequires : %{python_module pytest}
BuildRequires : %{python_module requests-mock}
2017-05-16 16:37:37 +00:00
BuildRequires : %{python_module setuptools}
2019-12-13 14:27:19 +00:00
BuildRequires : %{python_module typing}
2017-05-16 16:37:37 +00:00
BuildRequires : %{python_module xml}
2013-07-01 18:20:32 +00:00
BuildRequires : fdupes
2017-05-16 16:37:37 +00:00
BuildRequires : python-rpm-macros
Requires : python-lxml
Requires : python-requests
2019-12-13 14:27:19 +00:00
Requires : python-typing
2019-03-02 08:50:58 +00:00
Suggests : python-libvirt-python
Suggests : python-lockfile
2019-09-18 11:14:48 +00:00
Suggests : python-paramiko
2019-03-02 08:50:58 +00:00
Suggests : python-pysphere
2018-08-16 10:46:08 +00:00
BuildArch : noarch
2020-03-12 11:00:22 +00:00
%if %{with python2}
BuildRequires : python-backports.ssl_match_hostname
BuildRequires : python2
Requires : python-backports.ssl_match_hostname
%endif
2017-05-16 16:37:37 +00:00
%python_subpackages
2013-01-28 15:04:17 +00:00
%description
2017-05-16 16:37:37 +00:00
Apache Libcloud is a standard Python library that abstracts away
2013-07-01 18:20:32 +00:00
differences among multiple cloud provider APIs.
2013-01-28 15:04:17 +00:00
%prep
%setup -q -n apache-libcloud-%{version}
2020-02-22 07:30:59 +00:00
%patch1 -p1
2018-09-28 20:50:48 +00:00
%patch2 -p1
2020-10-29 15:28:58 +00:00
%patch3 -p1
2019-03-02 08:50:58 +00: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 15:04:17 +00:00
%build
2017-05-16 16:37:37 +00:00
%python_build
2013-01-28 15:04:17 +00:00
%install
2017-05-16 16:37:37 +00:00
%python_install
2018-08-16 10:46:08 +00:00
find %{buildroot} -name '*.DS_Store' -delete
find %{buildroot} -name '*.json' -size 0 -delete
find %{buildroot} -name '*.pem' -size 0 -delete
2019-09-18 11:23:27 +00:00
%python_expand rm -r %{buildroot} %{$python_sitelib}/libcloud/test
%python_expand %fdupes %{buildroot} %{$python_sitelib}
2013-01-28 15:04:17 +00:00
2019-03-02 08:50:58 +00:00
%check
# Skip ShellOutSSHClientTests tests which attempt to ssh to localhost
2020-10-30 14:58:04 +00:00
# Skip test_key_file_non_pem_format_error since OpenSSH support is backported for SLE python-paramiko < 2.7.0
2020-10-30 11:45:28 +00:00
# Note these four extra py3 failures are undesirable and should be fixed: fail in s390 and ppc64
2020-10-30 14:58:04 +00: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)'
2019-03-02 08:50:58 +00:00
2017-05-16 16:37:37 +00:00
%files %{python_files}
2018-05-02 15:36:50 +00:00
%license LICENSE
2019-03-02 08:50:58 +00:00
%doc CHANGES.rst README.rst demos/ example_*.py
2013-01-28 15:04:17 +00:00
%{python_sitelib} /*
%changelog