14
0
forked from pool/python-kasa
Files
python-kasa/python-kasa.spec

79 lines
2.2 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-kasa
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
# Disable tests for now due to https://github.com/python-kasa/python-kasa/issues/27
%bcond_with kasa_tests
Name: python-kasa
Version: 0.0~git1580219900.15b0c8c
Release: 0
Summary: Python API for TP-Link Kasa Smarthome products
License: GPL-3.0+
Url: https://github.com/python-kasa/python-kasa
Source0: python-kasa-%{version}.tar.xz
BuildRequires: fdupes
BuildRequires: %{python_module devel} >= 3.7
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
%if %{with kasa_tests}
BuildRequires: python3-pytest
BuildRequires: python3-pytest-asyncio
BuildRequires: python3-pytest-cov
BuildRequires: python3-voluptuous
%endif
# Runtime requires
Requires: python3-click >= 7.0
Requires: python3-setuptools
Requires: python3-pytest-asyncio
BuildArch: noarch
%python_subpackages
%description
This package contains the python module for interfacing with TP-Link smart devices: Plugs, Power Strips, Wall switches and bulbs.
Use 'kasa' binary.
%prep
%setup -q -n %{name}-%{version}
%build
%python_build
%install
%python_install
%fdupes %{buildroot}%{python_sitelib}
%if %{with kasa_tests}
%check
%{__python3} -m pytest -v
%endif
%files %{python_files}
%doc README.md
%license LICENSE
%{_bindir}/kasa
%dir %{python_sitelib}/kasa
%{python_sitelib}/kasa/*
%{python_sitelib}/*.egg-info*
%changelog