File python-docker-py.spec of Package python-docker-py.21958

#
# spec file for package python-docker-py
#
# Copyright (c) 2022 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/
#


%define upstream_name docker-py
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-docker-py
Version:        1.10.6
Release:        0
Summary:        Docker API Client
License:        Apache-2.0
Group:          System/Management
URL:            https://pypi.python.org/pypi/docker-py
Source0:        https://pypi.python.org/packages/source/d/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
BuildRequires:  %{python_module backports.ssl_match_hostname >= 3.5}
BuildRequires:  %{python_module docker-pycreds >= 0.2.1}
BuildRequires:  %{python_module mock}
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module requests >= 2.5.2}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module six >= 1.4.0}
BuildRequires:  %{python_module websocket-client >= 0.32.0}
BuildRequires:  fdupes
BuildRequires:  python
BuildRequires:  python-ipaddress >= 1.0.16
BuildRequires:  python-rpm-macros
BuildRequires:  python3
Requires:       python-backports.ssl_match_hostname >= 3.5
Requires:       python-docker-pycreds >= 0.2.1
Requires:       python-ipaddress >= 1.0.16
Requires:       python-requests >= 2.5.2
Requires:       python-six >= 1.4.0
Requires:       python-websocket-client >= 0.32.0
BuildArch:      noarch
Provides:       %{python_module docker = %{version}}
%python_subpackages

%description
A docker API client in Python

%prep
%setup -q -n %{upstream_name}-%{version}

%build
export LANG=en_US.UTF-8
%python_build

%install
export LANG=en_US.UTF-8
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%check
# the container cpus checks need newer pytest for fixtures, skip them
# matchhostname need internet
%python_expand PYTHONPATH="%{buildroot}%{$python_sitelib}" py.test-%{$python_bin_suffix} tests/unit -k 'not MatchHostnameTest and not test_create_container_with_cpu_shares and not test_create_container_with_cpuset'

%files %{python_files}
%license LICENSE
%doc README.md
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by