File python-fritzhome.spec of Package python-fritzhome
#
# spec file for package python-fritzhome
#
# Copyright (c) 2024-2025, Martin Hauke <mardnh@gmx.de>
#
# 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/
#
Name: python-fritzhome
Version: 0.6.17
Release: 0
Summary: Python Library to access AVM Fritz!Box homeautomation
License: MIT
URL: https://github.com/hthiery/python-fritzhome
Source: https://github.com/hthiery/python-fritzhome/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module pytest}
# SECTION test requirements
BuildRequires: %{python_module cryptography}
BuildRequires: %{python_module requests}
# /SECTION
BuildRequires: fdupes
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires: python-cryptography
Requires: python-requests
BuildArch: noarch
%python_subpackages
%description
Python Library to access AVM Fritz!Box homeautomation.
%prep
%autosetup -p1
sed -i '1{/^#!/ d}' pyfritzhome/cli.py
%build
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/fritzhome
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%post
%python_install_alternative fritzhome
%postun
%python_uninstall_alternative fritzhome
%files %{python_files}
%license LICENSE
%doc README.rst
%python_alternative %{_bindir}/fritzhome
%{python_sitelib}/pyfritzhome
%{python_sitelib}/pyfritzhome-%{version}.dist-info
%changelog