File python-hassil.spec of Package python-hassil

#
# spec file for package python-async-timeout
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without  test
%define         skip_python2 1
%define         skip_python36 1
%define         skip_python38 1
%define         skip_python39 1
%{!?license:    %global license %doc}
Name:           python-hassil
Version:        0.2.3
Release:        0
Summary:        Basic bluetooth models used by Home Assistant.
License:        Apache-2.0
Group:          Development/Languages/Python
Url:            https://pypi.python.org/packages/source/h/hassil/hassil-%version.tar.gz
Source:         hassil-%version.tar.xz
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module poetry-core}
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module wheel}
BuildRequires:  %{python_module PyYAML}
BuildRequires:  %{python_module unicode_rbnf}
BuildRequires:  %{python_module antlr4-python3-runtime}
BuildRequires:  %{python_module home-assistant-intents}
BuildRequires:  %{python_module pytest}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires:       python-PyYAML >= 6.0
Requires:       python-unicode_rbnf >= 2.3
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch:      noarch

%python_subpackages

%description

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

%build
%pyproject_wheel

%install
%pyproject_install
rm -Rf %{buildroot}%{python_sitelib}/tests
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/hassil

%check
#pytest

%post
%python_install_alternative hassil

%postun
%python_uninstall_alternative hassil

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

%changelog
openSUSE Build Service is sponsored by