2013-01-28 16:04:17 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-apache-libcloud
|
|
|
|
#
|
2020-01-16 20:25:37 +01:00
|
|
|
# Copyright (c) 2020 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-03-03 20:46:38 +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
|
2020-03-06 08:37:32 +01:00
|
|
|
Version: 2.8.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
|
2013-07-01 20:20:32 +02:00
|
|
|
Group: System/Monitoring
|
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
|
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}
|
|
|
|
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-09-30 21:28:09 +02:00
|
|
|
BuildRequires: python-backports.ssl_match_hostname
|
2017-05-16 18:37:37 +02:00
|
|
|
BuildRequires: python-rpm-macros
|
2020-03-03 20:46:38 +01:00
|
|
|
%if ! 0%{?skip_python2}
|
2018-05-11 06:58:09 +02:00
|
|
|
BuildRequires: python2
|
2020-03-03 20:46:38 +01:00
|
|
|
%endif
|
2017-05-16 18:37:37 +02:00
|
|
|
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
|
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
|
|
|
|
# Skip ShellOutSSHClientTests tests which attempt to ssh to localhost
|
2020-03-03 20:46:38 +01:00
|
|
|
%if ! 0%{?skip_python2}
|
2019-05-17 01:40:16 +02:00
|
|
|
python2 -m pytest -k 'not ShellOutSSHClientTests and \
|
2020-03-03 20:46:38 +01:00
|
|
|
not ElasticContainerDriverTestCase'
|
|
|
|
%endif
|
2019-03-02 09:50:58 +01:00
|
|
|
# Note these two extra py3 failures are undesirable and should be fixed
|
|
|
|
python3 -m 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 \
|
2019-05-17 01:40:16 +02:00
|
|
|
not ShellOutSSHClientTests and \
|
|
|
|
not ElasticContainerDriverTestCase'
|
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
|