forked from pool/python-phue
- Convert to pip-based build
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-phue?expand=0&rev=11
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 3 11:17:50 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Convert to pip-based build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 6 09:29:54 UTC 2022 - pgajdos@suse.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-phue
|
||||
#
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,7 +16,6 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-phue
|
||||
Version: 1.1
|
||||
Release: 0
|
||||
@@ -26,15 +25,16 @@ Group: Development/Languages/Python
|
||||
URL: https://github.com/studioimaginaire/phue
|
||||
# https://github.com/studioimaginaire/phue/issues/152
|
||||
Source0: https://github.com/studioimaginaire/phue/archive/1.1.tar.gz#/phue-%{version}.tar.gz
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module fixtures}
|
||||
BuildRequires: %{python_module pytest}
|
||||
# /SECTION
|
||||
BuildArch: noarch
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@@ -44,7 +44,7 @@ Full featured Python library to control the Philips Hue lighting system.
|
||||
%setup -q -n phue-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%check
|
||||
# https://github.com/studioimaginaire/phue/issues/196
|
||||
@@ -52,20 +52,19 @@ sed -i 's:import mock:import unittest.mock as mock:' tests/test_request.py
|
||||
%pytest
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%{python_expand chmod a+x %{buildroot}%{$python_sitelib}/phue.py
|
||||
sed -i "s|^#!/usr/bin/python$|#!%__$python|" %{buildroot}%{$python_sitelib}/phue.py
|
||||
sed -i "s|^#!%{_bindir}/python$|#!%__$python|" %{buildroot}%{$python_sitelib}/phue.py
|
||||
$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}
|
||||
%defattr(-,root,root,-)
|
||||
%doc *.md
|
||||
%license LICENSE
|
||||
%{python_sitelib}/phue.py*
|
||||
%{python_sitelib}/phue-%{version}-py*.egg-info
|
||||
%{python_sitelib}/phue-%{version}*-info
|
||||
%pycache_only %{python_sitelib}/__pycache__/phue*.py*
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user