File python-aiohomekit.spec of Package python-aiohomekit

#
# spec file for package python-aiohomekit
#
# 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/
#


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python39 1

Name:           python-aiohomekit
Version:        3.0.2
Release:        0
Summary:        An asyncio HomeKit client
License:        Apache-2.0
URL:            https://github.com/Jc2k/aiohomekit
Source:         aiohomekit-%{version}.tar.xz
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module poetry}
# SECTION test requirements
BuildRequires:  %{python_module aiocoap}
BuildRequires:  %{python_module async-timeout >= 4.0.2}
BuildRequires:  %{python_module bleak >= 0.19.0}
BuildRequires:  %{python_module bleak-retry-connector}
BuildRequires:  %{python_module chacha20poly1305-reuseable}
BuildRequires:  %{python_module commentjson >= 0.9.0}
BuildRequires:  %{python_module cryptography >= 2.9.2}
BuildRequires:  %{python_module orjson >= 3.7.8}
BuildRequires:  %{python_module zeroconf >= 0.32.0}
# /SECTION
BuildRequires:  fdupes
Requires:       python-aiocoap
Requires:       python-async-timeout >= 4.0.2
Requires:       python-bleak >= 0.19.0
Requires:       python-bleak-retry-connector
Requires:       python-chacha20poly1305-reuseable
Requires:       python-commentjson >= 0.9.0
Requires:       python-cryptography >= 2.9.2
Requires:       python-orjson >= 3.7.8
Requires:       python-zeroconf >= 0.32.0
BuildArch:      noarch
%python_subpackages

%description
An asyncio HomeKit client

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

%build
%pyproject_wheel

%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/aiohomekitctl
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%post
%python_install_alternative aiohomekitctl

%postun
%python_uninstall_alternative aiohomekitctl

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

%changelog
openSUSE Build Service is sponsored by