2017-01-31 14:48:52 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-phue
|
|
|
|
|
#
|
2025-06-03 11:18:22 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2017-01-31 14:48:52 +00:00
|
|
|
#
|
|
|
|
|
# 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.
|
|
|
|
|
|
2018-12-04 13:46:46 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-01-31 14:50:07 +00:00
|
|
|
#
|
2017-01-31 14:48:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
Name: python-phue
|
2019-03-25 14:40:12 +00:00
|
|
|
Version: 1.1
|
2017-01-31 14:48:52 +00:00
|
|
|
Release: 0
|
2017-09-07 20:28:57 +00:00
|
|
|
Summary: Philips Hue Python library
|
2017-01-31 14:50:07 +00:00
|
|
|
License: MIT
|
2017-01-31 14:48:52 +00:00
|
|
|
Group: Development/Languages/Python
|
2022-04-06 14:51:59 +00:00
|
|
|
URL: https://github.com/studioimaginaire/phue
|
2019-03-25 14:40:12 +00:00
|
|
|
# https://github.com/studioimaginaire/phue/issues/152
|
|
|
|
|
Source0: https://github.com/studioimaginaire/phue/archive/1.1.tar.gz#/phue-%{version}.tar.gz
|
2025-06-03 11:18:22 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2017-09-07 20:28:57 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2025-06-03 11:18:22 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2017-09-07 20:28:57 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-rpm-macros
|
2025-06-03 11:18:22 +00:00
|
|
|
BuildArch: noarch
|
2019-03-25 14:40:12 +00:00
|
|
|
# SECTION test requirements
|
|
|
|
|
BuildRequires: %{python_module fixtures}
|
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
|
# /SECTION
|
2017-09-07 20:28:57 +00:00
|
|
|
%python_subpackages
|
2017-01-31 14:48:52 +00:00
|
|
|
|
2017-09-07 20:28:57 +00:00
|
|
|
%description
|
|
|
|
|
Full featured Python library to control the Philips Hue lighting system.
|
2017-01-31 14:48:52 +00:00
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n phue-%{version}
|
|
|
|
|
|
|
|
|
|
%build
|
2025-06-03 11:18:22 +00:00
|
|
|
%pyproject_wheel
|
2017-01-31 14:48:52 +00:00
|
|
|
|
2019-03-25 14:40:12 +00:00
|
|
|
%check
|
2022-04-06 14:51:59 +00:00
|
|
|
# https://github.com/studioimaginaire/phue/issues/196
|
|
|
|
|
sed -i 's:import mock:import unittest.mock as mock:' tests/test_request.py
|
2019-03-25 14:40:12 +00:00
|
|
|
%pytest
|
|
|
|
|
|
2017-01-31 14:48:52 +00:00
|
|
|
%install
|
2025-06-03 11:18:22 +00:00
|
|
|
%pyproject_install
|
2017-09-07 20:28:57 +00:00
|
|
|
%{python_expand chmod a+x %{buildroot}%{$python_sitelib}/phue.py
|
2025-06-03 11:18:22 +00:00
|
|
|
sed -i "s|^#!%{_bindir}/python$|#!%__$python|" %{buildroot}%{$python_sitelib}/phue.py
|
2017-09-07 20:28:57 +00:00
|
|
|
$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}
|
|
|
|
|
$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}
|
|
|
|
|
%fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
%files %{python_files}
|
2019-03-25 14:40:12 +00:00
|
|
|
%doc *.md
|
|
|
|
|
%license LICENSE
|
2017-09-07 20:28:57 +00:00
|
|
|
%{python_sitelib}/phue.py*
|
2025-06-03 11:18:22 +00:00
|
|
|
%{python_sitelib}/phue-%{version}*-info
|
2017-09-07 20:28:57 +00:00
|
|
|
%pycache_only %{python_sitelib}/__pycache__/phue*.py*
|
2017-01-31 14:48:52 +00:00
|
|
|
|
|
|
|
|
%changelog
|