File saltbundlepy-docker.spec of Package saltbundlepy-docker

#
# spec file for package saltbundlepy-docker
#
# 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
# 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/
#


%{?!saltbundlepy_module:%define saltbundlepy_module() saltbundlepy-%{**}}
%define pythons saltbundlepy

Name:           saltbundlepy-docker
Version:        7.0.0
Release:        0
Summary:        A Python library for the Docker Engine API
License:        Apache-2.0
Group:          System/Management
URL:            https://github.com/docker/docker-py
Source:         https://files.pythonhosted.org/packages/source/d/docker/docker-%{version}.tar.gz
# PATCH-FIX-UPSTREAM picked from https://github.com/docker/docker-py/pull/3257 Fix for requests 2.32
Patch:          CVE-2024-35195.patch
# PATCH-FIX-UPSTREAM picked from https://github.com/docker/docker-py/pull/3196 Handle port number in registry name
Patch2:         tag_validation.patch
BuildRequires:  %{saltbundlepy_module pip}
BuildRequires:  %{saltbundlepy_module setuptools >= 45}
BuildRequires:  %{saltbundlepy_module setuptools-scm >= 6.2}
BuildRequires:  %{saltbundlepy_module wheel}
BuildRequires:  %{saltbundlepy_module base >= 3.11}
BuildRequires:  %{saltbundlepy_module docker-pycreds >= 0.4.0}
BuildRequires:  %{saltbundlepy_module paramiko >= 2.4.2}
BuildRequires:  %{saltbundlepy_module pytest}
BuildRequires:  %{saltbundlepy_module requests >= 2.20.0}
BuildRequires:  %{saltbundlepy_module websocket-client >= 0.40.0}
BuildRequires:  fdupes
BuildRequires:  saltbundlepy-rpm-macros
Requires:       saltbundlepy-docker-pycreds >= 0.4.0
Requires:       saltbundlepy-paramiko >= 2.4.2
Requires:       saltbundlepy-requests >= 2.20.0
Requires:       saltbundlepy-websocket-client >= 0.40.0
BuildArch:      noarch
%python_subpackages

%description
A Python library for the Docker Engine API.

%prep
%autosetup -p1 -n docker-%{version}

%build
%pyproject_wheel

%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%check
%if 0%{?suse_version} == 1315
%pytest tests/unit -k 'not SSLAdapterTest'
%else
%pytest tests/unit
%endif

%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitelib}/docker
%{python_sitelib}/docker-%{version}.dist-info

%changelog
openSUSE Build Service is sponsored by