forked from pool/python-apache-libcloud
- Switch to pyproject and autosetup macros.
- No more greedy globs in %files.
- Tidy up {Build,}Requires on typing and lxml.
- Stop skipping a bunch of tests, requests-mock has been fixed.
- Add patches support-pytest-8.patch, support-pytest-8.2.patch:
* Support running under pytest 8.2.x.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-apache-libcloud?expand=0&rev=135
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-apache-libcloud
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -22,7 +22,6 @@ Version: 3.8.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://downloads.apache.org/libcloud/apache-libcloud-%{version}.tar.gz
|
||||
Source1: https://downloads.apache.org/libcloud/apache-libcloud-%{version}.tar.gz.asc
|
||||
@@ -30,22 +29,24 @@ Source1: https://downloads.apache.org/libcloud/apache-libcloud-%{version}
|
||||
Source2: https://www.apache.org/dist/libcloud/KEYS#/%{name}.keyring
|
||||
Patch1: gce_image_projects.patch
|
||||
Patch2: ec2_create_node.patch
|
||||
# PATCH-FIX-UPSTREAM gh#apache/libcloud#1994
|
||||
Patch3: support-pytest-8.patch
|
||||
# PATCH-FIX-UPSTREAM gh#apache/libcloud#2014
|
||||
Patch4: support-pytest-8.2.patch
|
||||
BuildRequires: %{python_module base >= 3.7}
|
||||
BuildRequires: %{python_module fasteners}
|
||||
BuildRequires: %{python_module libvirt-python}
|
||||
BuildRequires: %{python_module lxml}
|
||||
BuildRequires: %{python_module paramiko}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pyOpenSSL}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module requests-mock}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module typing}
|
||||
BuildRequires: %{python_module wheel}
|
||||
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-fastners
|
||||
Suggests: python-paramiko
|
||||
@@ -58,18 +59,17 @@ Apache Libcloud is a standard Python library that abstracts away
|
||||
differences among multiple cloud provider APIs.
|
||||
|
||||
%prep
|
||||
%setup -q -n apache-libcloud-%{version}
|
||||
%autopatch -p1
|
||||
%autosetup -p1 -n apache-libcloud-%{version}
|
||||
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
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
find %{buildroot} -name '*.DS_Store' -delete
|
||||
find %{buildroot} -name '*.json' -size 0 -delete
|
||||
find %{buildroot} -name '*.pem' -size 0 -delete
|
||||
@@ -92,26 +92,16 @@ donttest+=" or test_list_nodes_invalid_region"
|
||||
donttest+=" or test_connection_timeout_raised"
|
||||
donttest+=" or test_retry_on_all_default_retry_exception_classes"
|
||||
|
||||
# Skip tests broken because requests-mock incompatibility with urllib3 >= 2.0.0
|
||||
# gh#jamielennox/requests-mock#228
|
||||
donttest+=" or test_openstack.py"
|
||||
donttest+=" or test_rackspace.py"
|
||||
donttest+=" or test_scaleway.py"
|
||||
donttest+=" or test_vcloud.py"
|
||||
donttest+=" or test_vultr_v2.py"
|
||||
donttest+=" or test_aurora.py"
|
||||
donttest+=" or test_azure_blobs.py"
|
||||
donttest+=" or test_cloudfiles.py"
|
||||
donttest+=" or test_google_storage.py"
|
||||
donttest+=" or test_oss.py"
|
||||
donttest+=" or test_ovh.py"
|
||||
donttest+=" or test_s3.py"
|
||||
# Works upstream, requires other changes made, drop after upgrade
|
||||
# from 3.8.0
|
||||
donttest+=" or test_init_once_and_debug_mode"
|
||||
|
||||
%pytest -k "not ($donttest)"
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc CHANGES.rst README.rst demos/ example_*.py
|
||||
%{python_sitelib}/*
|
||||
%{python_sitelib}/libcloud
|
||||
%{python_sitelib}/apache_libcloud-%{version}.dist-info
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user