File python-aiohasupervisor.spec of Package python-aiohasupervisor

#
# spec file for package python-acme
#
# Copyright (c) 2020 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_python310 1
%define         skip_python311 1
%define libname aiohasupervisor
Name:           python-%{libname}
Version:        0.4.3
Release:        0
Summary:        Client Library for Home Assistant Supervisor
License:        Apache-2.0
URL:            https://pypi.org/project/aiohasupervisor/
Source:         https://pypi.python.org/packages/source/a/%libname/%{libname}-%{version}.tar.gz
BuildRequires:  %{python_module pytest-runner}
BuildRequires:  %{python_module poetry-core}
BuildRequires:  %{python_module pip}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildArch:      noarch
Requires:       python-aiohttp >= 3.3.0
Requires:       python-mashumaro >= 3.11
Requires:       python-orjson >= 3.6.1
Requires:       python-yarl >= 1.6.0

%python_subpackages

%description
Python client for interfacing with the Home Assistant Supervisor via its REST API. Currently used in the Home Assistant Supervisor integration in Home Assistant.

Add-ons which interface with Supervisor can also leverage it. The library expects to find the access token in the SUPERVISOR_TOKEN env which is set automatically by Supervisor for add-ons. Currently there is no way to get a long-lived access token for Supervisor outside these use cases so the library's usage is limited to these.


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

%build
%pyproject_wheel

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

%files %{python_files}
%license LICENSE
%doc README.md
%{python_sitelib}/%{libname}
%{python_sitelib}/%{libname}-%{version}*-info
%pycache_only %{python_sitelib}/%{libname}/__pycache__

%changelog
openSUSE Build Service is sponsored by