From a7344c9b0f7ea468c9857fd82ad47d520efc5b6658b6aaa2dfe06404db46257e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 3 Jun 2025 11:18:22 +0000 Subject: [PATCH] - Convert to pip-based build OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-phue?expand=0&rev=11 --- python-phue.changes | 5 +++++ python-phue.spec | 17 ++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/python-phue.changes b/python-phue.changes index ec9c71a..81f1670 100644 --- a/python-phue.changes +++ b/python-phue.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 3 11:17:50 UTC 2025 - Markéta Machová + +- Convert to pip-based build + ------------------------------------------------------------------- Wed Apr 6 09:29:54 UTC 2022 - pgajdos@suse.com diff --git a/python-phue.spec b/python-phue.spec index 2d623fd..978a913 100644 --- a/python-phue.spec +++ b/python-phue.spec @@ -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