forked from pool/python-apache-libcloud
- Skip "OvhTests::test_list_nodes_invalid_region" compute test when building RPM package since this tests requires internet connection. - Update to 3.3.1: * Compute + [EC2] Fix a regression introduced in v3.3.0 which would break EC2 driver for some regions because the driver would incorrectly try to use signature version 2 for all the regions whereas some newer regions require signature version 4 to be used. If you are unable to upgrade, you can use the following workaround, as long as you only use code which supports / works with authentication signature algorithm version 4: import libcloud.common.aws libcloud.common.aws.DEFAULT_SIGNATURE_VERSION = "4" # Instantiate affected driver here... Reported by @olegrtecno. (GITHUB-1545, GITHUB-1546) + [EC2] Allow user to override which signature algorithm version is used for authentication by passing signature_version keyword argument to the EC2 driver constructor. (GITHUB-1546) * Storage + [Google Cloud Storage] Fix a bug and make sure we also correctly handle scenario in get_object() method when the object size is returned in x-goog-stored-content-length and not content-length header. @RunOrVeith. (GITHUB-1544, GITHUB-1547) + [Google Cloud Storage] Update get_object() method and ensure object.size attribute is an integer and not a string. This way it’s consistent with list_objects() method. (GITHUB-1547) - Update to 3.3.0: * Common + Fix a bug which would cause some prepared requests with empty bodies to be chunked which would cause some of the provider APIs such as OpenStack to return HTTP 400 errors. (GITHUB-1487, GITHUB-1488) [Michael Spagon - @mspagon] + Optimize various code imports (remove unnecessary imports, make some lazy, etc.), so now importing most of the modules is around ~20-40% faster (~70 vs ~140 ms) and in some cases such as EC2 driver even more. + Now majority of the import time is spent in importing requests library. (GITHUB-1519) [Tomaz Muraus] + libcloud.pricing.get_size_price() function has been updated so it only caches pricing data in memory for the requested drivers. + Advertise Python 3.9 support in setup.py. * Compute + [GCE] Fix ex_set_image_labels method using incorrect API path. (GITHUB-1485) [Poul Petersen - @petersen-poul] + [OpenStack] Fix error setting ex_force_XXX_url without setting ex_force_base_url. (GITHUB-1492) [Miguel Caballer - @micafer] + [EC2] Update supported EC2 regions and instance sizes and add support for eu-north-1 region. (GITHUB-1486) [Arturo Noha - @r2ronoha] + [Ovh] Add support for multiple regions to the driver. User can select a region (location) by passing location argument to the driver constructor (e.g. location=ca). (GITHUB-1494) [Dan Hunsaker - @danhunsaker] + [GCE] Add support for creating nodes without a service account associated with them. Now when an empty list is passed for ex_service_accounts argument, VM will be created without service account attached. OBS-URL: https://build.opensuse.org/request/show/868316 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-apache-libcloud?expand=0&rev=111
97 lines
3.7 KiB
RPMSpec
97 lines
3.7 KiB
RPMSpec
#
|
|
# spec file for package python-apache-libcloud
|
|
#
|
|
# Copyright (c) 2021 SUSE LLC
|
|
#
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
# No longer build for python2
|
|
%define skip_python2 1
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
Name: python-apache-libcloud
|
|
Version: 3.3.1
|
|
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}
|
|
BuildRequires: %{python_module mock}
|
|
BuildRequires: %{python_module paramiko}
|
|
BuildRequires: %{python_module pyOpenSSL}
|
|
BuildRequires: %{python_module pytest-runner}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module requests-mock}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: %{python_module typing}
|
|
BuildRequires: %{python_module xml}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-lxml
|
|
Requires: python-requests
|
|
Requires: python-typing
|
|
Suggests: python-libvirt-python
|
|
Suggests: python-lockfile
|
|
Suggests: python-paramiko
|
|
Suggests: python-pysphere
|
|
BuildArch: noarch
|
|
%python_subpackages
|
|
|
|
%description
|
|
Apache Libcloud is a standard Python library that abstracts away
|
|
differences among multiple cloud provider APIs.
|
|
|
|
%prep
|
|
%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
|
|
cp libcloud/test/secrets.py-dist libcloud/test/secrets.py
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
find %{buildroot} -name '*.DS_Store' -delete
|
|
find %{buildroot} -name '*.json' -size 0 -delete
|
|
find %{buildroot} -name '*.pem' -size 0 -delete
|
|
%python_expand rm -r %{buildroot}%{$python_sitelib}/libcloud/test
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
# Skip OvhTests::test_list_nodes_invalid_region which tries to reach OVH servers
|
|
# Skip ShellOutSSHClientTests tests which attempt to ssh to localhost
|
|
# Skip test_key_file_non_pem_format_error since OpenSSH support is backported for SLE python-paramiko < 2.7.0
|
|
# Note these four extra py3 failures are undesirable and should be fixed: fail in s390 and ppc64
|
|
%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)'
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc CHANGES.rst README.rst demos/ example_*.py
|
|
%{python_sitelib}/*
|
|
|
|
%changelog
|