File python-home-assistant-intents.spec of Package python-home-assistant-intents

#
# 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-home-assistant-intents
Version:        2024.3.27
Release:        0
Summary:        Basic bluetooth models used by Home Assistant.
License:        CC-BY-4.0
Group:          Development/Languages/Python
Url:            https://github.com/home-assistant/intents
Source:         intents-package-%version.tar.xz
BuildRequires:  %{python_module build}
BuildRequires:  %{python_module black}
BuildRequires:  %{python_module PyYAML}

BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module poetry-core}
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module wheel}
BuildRequires:  %{python_module hassil}
BuildRequires:  %{python_module jinja2}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires: python-async-timeout >= 4.0.2
Requires: python-dbus-next >= 0.2.3
BuildArch:      noarch

%python_subpackages

%description

%prep
%setup -q -n intents-package-%{version}
sed -i -e 's,^version[ ]*=.*,version = "%version",' pyproject.toml

%build
%pyproject_wheel
python3 script/merged_output.py data
python3 script/write_languages.py data > data/languages.py
black "data/languages.py"
               
%install
%pyproject_install
%python_expand mkdir -p %{buildroot}%{$python_sitelib}/home_assistant_intents
%python_expand cp -a data %{buildroot}%{$python_sitelib}/home_assistant_intents/
%python_expand %fdupes %{buildroot}%{$python_sitelib}

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

%changelog
openSUSE Build Service is sponsored by