File python-zha.spec of Package python-zha
#
# spec file for package python-attrs
#
# Copyright (c) 2018 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_with test
Name: python-zha
Version: 1.0.2
Release: 0
Summary: Zigbee Home Automation
License: GPL-3.0-or-later
Group: Development/Languages/Python
Url: https://github.com/zigpy/zha
Source: zha-%{version}.tar.xz
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module StrEnum}
BuildRequires: %{python_module jsonschema}
BuildRequires: %{python_module zigpy}
BuildRequires: %{python_module bellows}
BuildRequires: %{python_module zigpy-znp}
BuildRequires: %{python_module zigpy-deconz}
BuildRequires: %{python_module zigpy-xbee}
BuildRequires: %{python_module zigpy-zigate}
BuildRequires: %{python_module zhaquirks}
BuildRequires: %{python_module pyserial}
BuildRequires: %{python_module pyserial-asyncio-fast}
BuildRequires: %{python_module pytest}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
Requires: python-pyserial-asyncio-fast
# get versioned requires
# is not playing well with python_subpackages macro ...
# and obs-server-python_requires is not supporting pyproject.yaml
#( tar xf %{S:0} --wildcards \*/pyproject.toml --to-command='cat' | sed -n '/^depen/,/^]/ s/[ ]*\"\([^=]*\)\(=.\)\(.*\)\",/Requires: python-\1 \2 \3/p' )
# sed -n '/^depen/,/^]/ s/[ ]*\"\([^=]*\)\(=.\)\(.*\)\",/Requires: python-\1 \2 \3/p' zha/pyproject.toml
Requires: python-zigpy == 1.2.2
Requires: python-bellows == 0.49.0
Requires: python-zigpy-znp == 0.14.3
Requires: python-zigpy-deconz == 0.25.5
Requires: python-zigpy-xbee == 0.21.1
Requires: python-zigpy-zigate == 0.13.4
Requires: python-zha-quirks == 1.1.1
Requires: python-pyserial == 3.5
%python_subpackages
%description
Zigbee Home Automation
%prep
%setup -q -n zha-%{version}
sed -i -e 's,^dynamic = .*,version = "%version",' pyproject.toml
%build
%python_build
%install
%python_install
rm -Rf %{buildroot}%{python_sitelib}/tests
%fdupes %{buildroot}%{_prefix}
%check
#pytest
%files %{python_files}
%license LICENSE
%doc README.md
%{python_sitelib}/tools
%{python_sitelib}/zha*
%changelog